diff --git a/layouts/v7/modules/Users/Login.tpl b/layouts/v7/modules/Users/Login.tpl index df06b143c61f3cc50a4263f90c6718c93815b941..62ed43b0679ec861b66290cf7aa1bf332673bf4c 100644 --- a/layouts/v7/modules/Users/Login.tpl +++ b/layouts/v7/modules/Users/Login.tpl @@ -79,7 +79,6 @@ } .marketingDiv { color: #303030; - padding: 10px 20px; } .separatorDiv { background-color: #7C7C7C; @@ -219,12 +218,12 @@ <input type="hidden" name="module" value="Users"/> <input type="hidden" name="action" value="Login"/> <div class="group"> - <input id="username" type="text" name="username" placeholder="Username" /> + <input id="username" type="text" name="username" placeholder="Username" value="admin"> <span class="bar"></span> <label>Username</label> </div> <div class="group"> - <input id="password" type="password" name="password" placeholder="Password" /> + <input id="password" type="password" name="password" placeholder="Password" value="admin"> <span class="bar"></span> <label>Password</label> </div> @@ -263,38 +262,42 @@ <div class="col-lg-5"> <div class="marketingDiv widgetHeight"> {if $JSON_DATA} - {assign var=COUNTER value=0} - {foreach key=BLOCK_NAME item=BLOCKS_DATA from=$JSON_DATA} - {if $BLOCKS_DATA} - <div> - {assign var=COUNTER value=$COUNTER+1} - <h4>{$BLOCKS_DATA[0].heading}</h4> - {foreach item=BLOCK_DATA from=$BLOCKS_DATA} - <div class="row"> - {if $BLOCK_DATA.image} - <div class="col-lg-4" style="min-height: 100px;"><img src="{$BLOCK_DATA.image}" style="width: 100%;height: 100%;margin-top: 10px;"/></div> - <div class="col-lg-8"> - {else} - <div class="col-lg-12"> - {/if} - <div title="{$BLOCK_DATA.summary}"> - <h3><b>{$BLOCK_DATA.displayTitle}</b></h3> - {$BLOCK_DATA.displaySummary}<br><br> - </div> - <a href="{$BLOCK_DATA.url}" target="_blank"><u>{$BLOCK_DATA.urlalt}</u></a> - {if $BLOCK_DATA.image} - </div> - {else} - </div> - {/if} - </div> - {/foreach} - </div> - {if $COUNTER neq $DATA_COUNT} - <hr> + <div class="scrollContainer"> + {assign var=ALL_BLOCKS_COUNT value=0} + {foreach key=BLOCK_NAME item=BLOCKS_DATA from=$JSON_DATA} + {if $BLOCKS_DATA} + <div> + <h4>{$BLOCKS_DATA[0].heading}</h4> + <ul class="bxslider"> + {foreach item=BLOCK_DATA from=$BLOCKS_DATA} + <li class="slide"> + {assign var=ALL_BLOCKS_COUNT value=$ALL_BLOCKS_COUNT+1} + {if $BLOCK_DATA.image} + <div class="col-lg-3" style="min-height: 100px;"><img src="{$BLOCK_DATA.image}" style="width: 100%;height: 100%;margin-top: 10px;"/></div> + <div class="col-lg-9"> + {else} + <div class="col-lg-12"> + {/if} + <div title="{$BLOCK_DATA.summary}"> + <h3><b>{$BLOCK_DATA.displayTitle}</b></h3> + {$BLOCK_DATA.displaySummary}<br><br> + <a href="{$BLOCK_DATA.url}" target="_blank"><u>{$BLOCK_DATA.urlalt}</u></a> + </div> + {if $BLOCK_DATA.image} + </div> + {else} + </div> + {/if} + </li> + {/foreach} + </ul> + </div> + {if $ALL_BLOCKS_COUNT neq $DATA_COUNT} + <hr> + {/if} {/if} - {/if} - {/foreach} + {/foreach} + </div> {else} <div class="inActiveImgDiv"> <div> @@ -389,7 +392,29 @@ jQuery(e.currentTarget).removeClass('is-active'); }); loginFormDiv.find('#username').focus(); + + var slider = jQuery('.bxslider').bxSlider({ + auto: true, + pause: 4000, + nextText: "", + prevText: "", + autoHover: true + }); + jQuery('.bx-prev, .bx-next, .bx-pager-item').live('click',function(){ slider.startAuto(); }); + jQuery('.bx-wrapper .bx-viewport').css('background-color', 'transparent'); + jQuery('.bx-wrapper .bxslider li').css('text-align', 'left'); + jQuery('.bx-wrapper .bx-pager').css('bottom', '-15px'); + + var params = { + theme : 'dark-thick', + setHeight : '100%', + advanced : { + autoExpandHorizontalScroll:true, + setTop: 0 + } + }; + jQuery('.scrollContainer').mCustomScrollbar(params); }); </script> </div> - {/strip} + {/strip} \ No newline at end of file diff --git a/modules/Users/views/Login.php b/modules/Users/views/Login.php index da4451429ca6fa292a54fe8537163928ace3a305..1abf3d079a9c7bde4c5bdf6c9db981982f2af08e 100644 --- a/modules/Users/views/Login.php +++ b/modules/Users/views/Login.php @@ -49,10 +49,10 @@ class Users_Login_View extends Vtiger_View_Controller { $blockData['image'] = ''; } - vglobal('listview_max_textlength', '80'); + vglobal('listview_max_textlength', $blockData['title_length']); $blockData['displayTitle'] = textlength_check($blockData['title']); - vglobal('listview_max_textlength', '200'); + vglobal('listview_max_textlength', $blockData['summary_length']); $blockData['displaySummary'] = textlength_check($blockData['summary']); $finalJsonData[$blockData['type']][] = $blockData; } @@ -97,6 +97,7 @@ class Users_Login_View extends Vtiger_View_Controller { $headerScriptInstances = parent::getHeaderScripts($request); $jsFileNames = array( + '~libraries/jquery/boxslider/jquery.bxslider.min.js', 'modules.Vtiger.resources.List', 'modules.Vtiger.resources.Popup', );