liquid_feedback_frontend
diff app/main/_layout/default.html @ 1045:701a5cf6b067
Imported LiquidFeedback Frontend 3.0 branch
author | bsw |
---|---|
date | Thu Jul 10 01:19:48 2014 +0200 (2014-07-10) |
parents | b865f87ea810 |
children | 58d703bb06e4 |
line diff
1.1 --- a/app/main/_layout/default.html Thu Jul 10 01:02:43 2014 +0200 1.2 +++ b/app/main/_layout/default.html Thu Jul 10 01:19:48 2014 +0200 1.3 @@ -1,67 +1,277 @@ 1.4 <html> 1.5 - <head> 1.6 - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 1.7 - <meta name="viewport" content="width=device-width" /> 1.8 - <title> <!-- WEBMCP SLOTNODIV html_title --></title> 1.9 - <link rel="stylesheet" type="text/css" media="screen" href="__BASEURL__/static/trace.css" /> 1.10 - <link rel="stylesheet" type="text/css" media="screen" href="__BASEURL__/static/gregor.js/gregor.css" /> 1.11 - <link rel="stylesheet" type="text/css" media="screen" href="<!-- WEBMCP SLOTNODIV stylesheet_url -->" /> 1.12 - <!-- WEBMCP SLOTNODIV html_head --> 1.13 - <script type="text/javascript">jsFail = true;</script> 1.14 - <![if !IE]> 1.15 - <script type="text/javascript">jsFail = false;</script> 1.16 - <![endif]> 1.17 - <script type="text/javascript" src="__BASEURL__/static/js/jsprotect.js"></script> 1.18 - <script type="text/javascript" src="__BASEURL__/static/js/partialload.js"></script> 1.19 - <script type="text/javascript">var ui_tabs_active = {};</script> 1.20 - </head> 1.21 - <body> 1.22 - <div class="topbar"> 1.23 - <div class="topbar_content"> 1.24 - <div class="navigation" id="navigation"> 1.25 - <!-- WEBMCP SLOT navigation --> 1.26 - </div> 1.27 - <div class="navigation_right" id="navigation_right"> 1.28 - <!-- WEBMCP SLOT navigation_right --> 1.29 - </div> 1.30 - <div class="help_hidden" id="help_hidden"> 1.31 - <!-- WEBMCP SLOT help_hidden --> 1.32 - </div> 1.33 - <br style="clear: both;" /> 1.34 +<head> 1.35 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 1.36 + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> 1.37 + <title><!-- WEBMCP SLOTNODIV html_title --></title> 1.38 + <link rel="stylesheet" type="text/css" media="screen" href="__BASEURL__/static/gregor.js/gregor.css" /> 1.39 + <link rel="stylesheet" type="text/less" href="__BASEURL__/static/lf3.less" /> 1.40 + <!-- WEBMCP SLOTNODIV html_head --> 1.41 + <script type="text/javascript" src="__BASEURL__/static/js/less-1.4.1.min.js"></script> 1.42 + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> 1.43 + <script type="text/javascript">jsFail = true;</script> 1.44 + <![if !IE]> 1.45 + <script type="text/javascript">jsFail = false;</script> 1.46 + <![endif]> 1.47 + <script type="text/javascript" src="__BASEURL__/static/js/jsprotect.js"></script> 1.48 + <script type="text/javascript" src="__BASEURL__/static/js/partialload.js"></script> 1.49 + <script type="text/javascript">var ui_tabs_active = {};</script> 1.50 +</head> 1.51 +<body style=""> 1.52 +<div class="head_outer"> 1.53 + <div class="head"> 1.54 + <div class="nav"> 1.55 + <!--WEBMCP SLOTNODIV navigation --> 1.56 + <!--WEBMCP SLOTNODIV navigation_right --> 1.57 + <!--WEBMCP SLOTNODIV notification --> 1.58 + </div> 1.59 + 1.60 + <a class="logo" href="__BASEURL__/"> 1.61 + <span class="liquid">Liquid</span><span class="feedback">Feedback</span> 1.62 + <span class="instanceName"><!-- WEBMCP SLOTNODIV instance_name --></span> 1.63 + </a> 1.64 + 1.65 + 1.66 + </div> 1.67 +</div> 1.68 + 1.69 +<div class="page"> 1.70 + <div class="layout_notice" id="layout_notice" onclick="document.getElementById('layout_notice').style.display='none';"> 1.71 + <!-- WEBMCP SLOT notice --> 1.72 + </div> 1.73 + 1.74 + <div class="layout_warning" id="layout_warning" onclick="document.getElementById('layout_warning').style.display='none';"> 1.75 + <!-- WEBMCP SLOT warning --> 1.76 + </div> 1.77 + 1.78 + <div class="layout_error" id="layout_error" onclick="document.getElementById('layout_error').style.display='none';"> 1.79 + <!-- WEBMCP SLOT error --> 1.80 + </div> 1.81 + 1.82 + <div class="layout_motd" id="layout_motd" onclick="document.getElementById('layout_motd').style.display='none';"> 1.83 + <!-- WEBMCP SLOT motd --> 1.84 + </div> 1.85 + 1.86 + <div class="title_outer"> 1.87 + <!-- WEBMCP SLOT title --> 1.88 + </div> 1.89 + 1.90 + <!-- WEBMCP SLOT tabs --> 1.91 + 1.92 + <!-- WEBMCP SLOTNODIV actions --> 1.93 + 1.94 + <div id="swiper_tabs" class="swiper_tabs" style="display: none;"> 1.95 +<!-- <div><a id="tab-0" href="#" onclick="slider.to(0); return false;"><img src="__BASEURL__/static/icons/16/chart_organisation.png" /></a></div>--> 1.96 + <div><a id="tab-0" href="#" onclick="slider.to(0); return false;"><img src="__BASEURL__/static/icons/16/text_list_bullets.png" width="32" height="32" /></a></div> 1.97 + <div><a id="tab-1" href="#" onclick="slider.to(1); return false;"><img src="__BASEURL__/static/icons/48/info.png" width="32" height="32" /></a></div> 1.98 + <div><a id="tab-2" href="#" onclick="slider.to(2); return false;"><img src="__BASEURL__/static/icons/16/group.png" width="32" height="32" /></a></div> 1.99 + </div> 1.100 + 1.101 + <div id="swiper_info"><!-- WEBMCP SLOTNODIV swiper_info --></div> 1.102 + <div id="swiper" class="swiper" style="position: absolute; width: 100%;"> 1.103 + <div id="swiper_wrap" class="swiper_wrap"> 1.104 + </div> 1.105 + </div> 1.106 + 1.107 + <div class="content"> 1.108 + <div class="sidebar"> 1.109 + <!-- WEBMCP SLOTNODIV sidebar --> 1.110 + </div> 1.111 + 1.112 + <div class="main_outer"> 1.113 + <!-- WEBMCP SLOTNODIV slideshow --> 1.114 + <div class="main"> 1.115 + <!-- WEBMCP SLOTNODIV default --> 1.116 + <!-- WEBMCP SLOTNODIV extra --> 1.117 </div> 1.118 </div> 1.119 - <div class="page"> 1.120 - <div class="page_head" id="head"> 1.121 - <!-- WEBMCP SLOT head --> 1.122 - </div> 1.123 - <div class="layout_notice" id="layout_notice" onclick="document.getElementById('layout_notice').style.display='none';"> 1.124 - <!-- WEBMCP SLOT notice --> 1.125 - </div> 1.126 - <div class="layout_warning" id="layout_warning" onclick="document.getElementById('layout_warning').style.display='none';"> 1.127 - <!-- WEBMCP SLOT warning --> 1.128 - </div> 1.129 - <div class="layout_error" id="layout_error" onclick="document.getElementById('layout_error').style.display='none';"> 1.130 - <!-- WEBMCP SLOT error --> 1.131 - </div> 1.132 - <div class="main" id="default"> 1.133 - <!-- WEBMCP SLOT default --> 1.134 - </div> 1.135 - <br style="clear: both;" /> 1.136 - </div> 1.137 - <div class="footer" id="footer"> 1.138 - <!-- WEBMCP SLOT footer --> 1.139 - </div> 1.140 - <!-- WEBMCP SLOT trace_button --> 1.141 + </div> 1.142 + <br style="clear: both;" /> 1.143 + <div class="footer"> 1.144 + <!-- WEBMCP SLOTNODIV footer --> 1.145 + </div> 1.146 +</div> 1.147 + 1.148 + <div id="trace"> 1.149 + <!-- WEBMCP SLOTNODIV trace_button --> 1.150 <div id="trace_content" style="display: none;"> 1.151 <tt id="system_error"><!-- WEBMCP SLOT system_error --></tt> 1.152 - <div id="trace"> </div><hr /> 1.153 + <h1>System trace (for computer programmers purposes)</h1> 1.154 + <br /> 1.155 <!-- WEBMCP SLOT trace --> 1.156 <div class="trace_close" onclick="document.getElementById('trace_show').style.display='block';document.getElementById('trace_content').style.display='none';"> 1.157 close 1.158 </div> 1.159 </div> 1.160 - <script type="text/javascript"> 1.161 - <!-- WEBMCP SLOTNODIV custom_script --> 1.162 - </script> 1.163 - </body> 1.164 + </div> 1.165 + <script> 1.166 + $(".trace_view > .trace_list").hide(); 1.167 + $(".trace_head").click(function() { 1.168 + var el = this.nextSibling 1.169 + if (el) $(el).toggle(); 1.170 + }); 1.171 + </script> 1.172 + 1.173 + <!-- WEBMCP SLOTNODIV script --> 1.174 + 1.175 + <script> 1.176 + 1.177 + var slider; 1.178 + 1.179 + function initSlider () { 1.180 + 1.181 + var els = [ 1.182 + $( '.main, .extra' ), 1.183 + $( '.tab-notification, .tab-whatcanido' ), 1.184 + $( '.tab-members' ) 1.185 + ]; 1.186 + 1.187 + var sidebarFound = false; 1.188 + for ( i = 1; i < els.length; i++) { 1.189 + if (els[i].length > 0) sidebarFound = true; 1.190 + } 1.191 + 1.192 + if (sidebarFound) $("#swiper_tabs").show(); 1.193 + 1.194 + var elsCount = 3; 1.195 + 1.196 + var slidePos; 1.197 + 1.198 + function slideTo ( pos ) { 1.199 + if ( typeof ( slidePos ) != "undefined" ) { 1.200 + els[ slidePos ].hide(); 1.201 + $ ( "#tab-" + slidePos ).removeClass ( "active" ); 1.202 + } 1.203 + slidePos = pos; 1.204 + els[ slidePos ].show(); 1.205 + $ ( "#tab-" + slidePos ).addClass ( "active" ); 1.206 + if (pos == 1) { 1.207 + $("#swiper_info").hide(); 1.208 + } 1.209 + } 1.210 + 1.211 + function slideNext () { 1.212 + var pos = slidePos + 1; 1.213 + if ( pos > elsCount - 1 ) { 1.214 + pos = elsCount - 1; 1.215 + } else { 1.216 + $( "#swiper").css("left", "400px"); 1.217 + $( "#swiper").animate({ "left": "0px" }, 200); 1.218 + } 1.219 + slideTo ( pos ); 1.220 + } 1.221 + 1.222 + function slidePrev () { 1.223 + var pos = slidePos - 1; 1.224 + if ( pos < 0 ) { 1.225 + pos = 0; 1.226 + } else { 1.227 + $( "#swiper").css("left", "-400px"); 1.228 + $( "#swiper").animate({ "left": "0px" }, 200); 1.229 + } 1.230 + slideTo ( pos ); 1.231 + } 1.232 + 1.233 + function exit() { 1.234 + for ( i = 0; i < els.length; i++) { 1.235 + els[i].show(); 1.236 + } 1.237 + $( ".main_outer" ).append ( $( ".main" ).detach() ); 1.238 + $( ".extra_outer" ).append ( $( ".extra" ).detach() ); 1.239 + $( ".sidebar" ).append ( $(els[1]).detach() ); 1.240 + $( ".sidebar" ).append ( $(els[2]).detach() ); 1.241 + $( ".page" ).append ( $('.footer') ); 1.242 + $( "body" ).append ( $('#trace') ); 1.243 + 1.244 + } 1.245 + 1.246 + var touchStartX; 1.247 + var touchStartY; 1.248 + var isScrolling; 1.249 + 1.250 + function touchDown ( e ) { 1.251 + touchStartX = e.originalEvent.touches[0].pageX; 1.252 + touchStartY = e.originalEvent.touches[0].pageY; 1.253 + isScrolling = undefined; 1.254 + } 1.255 + 1.256 + function touchMove ( e ) { 1.257 + var diffX = touchStartX - e.originalEvent.changedTouches[0].pageX; 1.258 + var diffY = touchStartY - e.originalEvent.changedTouches[0].pageY; 1.259 + if ( typeof( isScrolling ) == 'undefined' ) { 1.260 + isScrolling = Math.abs ( diffY ) > Math.abs ( diffX ); 1.261 + } 1.262 + if ( ! isScrolling ) { 1.263 + $( "#swiper").css("left", -diffX + "px"); 1.264 + e.preventDefault(); 1.265 + } 1.266 + } 1.267 + 1.268 + function touchUp ( e ) { 1.269 + var diffX = touchStartX - e.originalEvent.changedTouches[0].pageX; 1.270 + var diffY = touchStartY - e.originalEvent.changedTouches[0].pageY; 1.271 + 1.272 + if ( isScrolling ) { 1.273 + // vertical scrolling 1.274 + return; 1.275 + } 1.276 + 1.277 + if ( Math.abs ( diffX ) < 100 ) { 1.278 + // go back not enough 1.279 + $( "#swiper").animate({ 1.280 + "left": "0px", 1.281 + }, 200); 1.282 + return; 1.283 + } 1.284 + var direction = diffX < 0 ? "right" : "left"; 1.285 + 1.286 + if ( direction == "left" ) { 1.287 + slideNext(); 1.288 + } else { 1.289 + slidePrev(); 1.290 + } 1.291 + } 1.292 + 1.293 + for ( i = 0; i < els.length; i++) { 1.294 + var el = els[i].detach(); 1.295 + el.hide(); 1.296 + $('#swiper_wrap').append ( el ) ; 1.297 + } 1.298 + 1.299 + $('#swiper_wrap').append ( $('.footer') ); 1.300 + $('#swiper_wrap').append ( $('#trace') ); 1.301 + slideTo ( 0 ); 1.302 + 1.303 + if ( 'ontouchstart' in document.documentElement ) { 1.304 + $( "body" ).on( "touchstart", touchDown ); 1.305 + $( "body" ).on( "touchmove", touchMove ); 1.306 + $( "body" ).on( "touchend", touchUp ); 1.307 + } 1.308 + 1.309 + return { 1.310 + to: slideTo, 1.311 + exit: exit 1.312 + } 1.313 + 1.314 + } 1.315 + 1.316 + function resizeHandler() { 1.317 + if ( $(window).width() < 768 ) { 1.318 + if ( typeof ( slider ) == "undefined" ) { 1.319 + slider = initSlider(); 1.320 + } 1.321 + } else { 1.322 + if ( typeof ( slider ) != "undefined" ) { 1.323 + slider.exit(); 1.324 + slider = undefined; 1.325 + } 1.326 + } 1.327 + 1.328 + } 1.329 + 1.330 + $( window ).resize( resizeHandler ); 1.331 + resizeHandler(); 1.332 + 1.333 + </script> 1.334 + 1.335 +</body> 1.336 </html>