diff --git a/admin-dev/themes/default/css/admin-theme.css b/admin-dev/themes/default/css/admin-theme.css index e9cfd7f9a..a2ebb57f2 100644 --- a/admin-dev/themes/default/css/admin-theme.css +++ b/admin-dev/themes/default/css/admin-theme.css @@ -240,9 +240,9 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .row:before, #dashboard .data_list_vertical:before, .row:after, #dashboard .data_list_vertical:after { content: " "; /* 1 */ display: table; /* 2 */ } .row:after, #dashboard .data_list_vertical:after { clear: both; } -.col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-4, #dashboard .data_list_vertical li, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { position: relative; min-height: 1px; padding-left: 5px; padding-right: 5px; } +.col-xs-12, .col-sm-12, .col-md-12, .col-lg-12, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-4, #dashboard .data_list_vertical li, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1 { position: relative; min-height: 1px; padding-left: 5px; padding-right: 5px; } -.col-xs-11, .col-xs-10, .col-xs-9, .col-xs-8, .col-xs-7, .col-xs-6, .col-xs-5, .col-xs-4, #dashboard .data_list_vertical li, .col-xs-3, .col-xs-2, .col-xs-1, .col-xs-12 { float: left; } +.col-xs-12, .col-xs-11, .col-xs-10, .col-xs-9, .col-xs-8, .col-xs-7, .col-xs-6, .col-xs-5, .col-xs-4, #dashboard .data_list_vertical li, .col-xs-3, .col-xs-2, .col-xs-1 { float: left; } .col-xs-1 { width: 8.33333%; } @@ -268,6 +268,8 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-xs-12 { width: 100%; } +.col-xs-pull-0 { right: 0%; } + .col-xs-pull-1 { right: 8.33333%; } .col-xs-pull-2 { right: 16.66667%; } @@ -292,6 +294,8 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-xs-pull-12 { right: 100%; } +.col-xs-push-0 { left: 0%; } + .col-xs-push-1 { left: 8.33333%; } .col-xs-push-2 { left: 16.66667%; } @@ -316,6 +320,8 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-xs-push-12 { left: 100%; } +.col-xs-offset-0 { margin-left: 0%; } + .col-xs-offset-1 { margin-left: 8.33333%; } .col-xs-offset-2 { margin-left: 16.66667%; } @@ -341,7 +347,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-xs-offset-12 { margin-left: 100%; } @media (min-width: 768px) { .container { width: 728px; } - .col-sm-11, .col-sm-10, .col-sm-9, .col-sm-8, .col-sm-7, .col-sm-6, .col-sm-5, .col-sm-4, .col-sm-3, .col-sm-2, .col-sm-1, .col-sm-12 { float: left; } + .col-sm-12, .col-sm-11, .col-sm-10, .col-sm-9, .col-sm-8, .col-sm-7, .col-sm-6, .col-sm-5, .col-sm-4, .col-sm-3, .col-sm-2, .col-sm-1 { float: left; } .col-sm-1 { width: 8.33333%; } .col-sm-2 { width: 16.66667%; } .col-sm-3 { width: 25%; } @@ -354,6 +360,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-sm-10 { width: 83.33333%; } .col-sm-11 { width: 91.66667%; } .col-sm-12 { width: 100%; } + .col-sm-pull-0 { right: 0%; } .col-sm-pull-1 { right: 8.33333%; } .col-sm-pull-2 { right: 16.66667%; } .col-sm-pull-3 { right: 25%; } @@ -366,6 +373,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-sm-pull-10 { right: 83.33333%; } .col-sm-pull-11 { right: 91.66667%; } .col-sm-pull-12 { right: 100%; } + .col-sm-push-0 { left: 0%; } .col-sm-push-1 { left: 8.33333%; } .col-sm-push-2 { left: 16.66667%; } .col-sm-push-3 { left: 25%; } @@ -378,6 +386,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-sm-push-10 { left: 83.33333%; } .col-sm-push-11 { left: 91.66667%; } .col-sm-push-12 { left: 100%; } + .col-sm-offset-0 { margin-left: 0%; } .col-sm-offset-1 { margin-left: 8.33333%; } .col-sm-offset-2 { margin-left: 16.66667%; } .col-sm-offset-3 { margin-left: 25%; } @@ -391,7 +400,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-sm-offset-11 { margin-left: 91.66667%; } .col-sm-offset-12 { margin-left: 100%; } } @media (min-width: 992px) { .container { width: 940px; } - .col-md-11, .col-md-10, .col-md-9, .col-md-8, .col-md-7, .col-md-6, .col-md-5, .col-md-4, .col-md-3, .col-md-2, .col-md-1, .col-md-12 { float: left; } + .col-md-12, .col-md-11, .col-md-10, .col-md-9, .col-md-8, .col-md-7, .col-md-6, .col-md-5, .col-md-4, .col-md-3, .col-md-2, .col-md-1 { float: left; } .col-md-1 { width: 8.33333%; } .col-md-2 { width: 16.66667%; } .col-md-3 { width: 25%; } @@ -404,6 +413,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-md-10 { width: 83.33333%; } .col-md-11 { width: 91.66667%; } .col-md-12 { width: 100%; } + .col-md-pull-0 { right: 0%; } .col-md-pull-1 { right: 8.33333%; } .col-md-pull-2 { right: 16.66667%; } .col-md-pull-3 { right: 25%; } @@ -416,6 +426,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-md-pull-10 { right: 83.33333%; } .col-md-pull-11 { right: 91.66667%; } .col-md-pull-12 { right: 100%; } + .col-md-push-0 { left: 0%; } .col-md-push-1 { left: 8.33333%; } .col-md-push-2 { left: 16.66667%; } .col-md-push-3 { left: 25%; } @@ -428,6 +439,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-md-push-10 { left: 83.33333%; } .col-md-push-11 { left: 91.66667%; } .col-md-push-12 { left: 100%; } + .col-md-offset-0 { margin-left: 0%; } .col-md-offset-1 { margin-left: 8.33333%; } .col-md-offset-2 { margin-left: 16.66667%; } .col-md-offset-3 { margin-left: 25%; } @@ -441,7 +453,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-md-offset-11 { margin-left: 91.66667%; } .col-md-offset-12 { margin-left: 100%; } } @media (min-width: 1200px) { .container { width: 1170px; } - .col-lg-11, .col-lg-10, .col-lg-9, .col-lg-8, .col-lg-7, .col-lg-6, .col-lg-5, .col-lg-4, .col-lg-3, .col-lg-2, .col-lg-1, .col-lg-12 { float: left; } + .col-lg-12, .col-lg-11, .col-lg-10, .col-lg-9, .col-lg-8, .col-lg-7, .col-lg-6, .col-lg-5, .col-lg-4, .col-lg-3, .col-lg-2, .col-lg-1 { float: left; } .col-lg-1 { width: 8.33333%; } .col-lg-2 { width: 16.66667%; } .col-lg-3 { width: 25%; } @@ -454,6 +466,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-lg-10 { width: 83.33333%; } .col-lg-11 { width: 91.66667%; } .col-lg-12 { width: 100%; } + .col-lg-pull-0 { right: 0%; } .col-lg-pull-1 { right: 8.33333%; } .col-lg-pull-2 { right: 16.66667%; } .col-lg-pull-3 { right: 25%; } @@ -466,6 +479,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-lg-pull-10 { right: 83.33333%; } .col-lg-pull-11 { right: 91.66667%; } .col-lg-pull-12 { right: 100%; } + .col-lg-push-0 { left: 0%; } .col-lg-push-1 { left: 8.33333%; } .col-lg-push-2 { left: 16.66667%; } .col-lg-push-3 { left: 25%; } @@ -478,6 +492,7 @@ pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap .col-lg-push-10 { left: 83.33333%; } .col-lg-push-11 { left: 91.66667%; } .col-lg-push-12 { left: 100%; } + .col-lg-offset-0 { margin-left: 0%; } .col-lg-offset-1 { margin-left: 8.33333%; } .col-lg-offset-2 { margin-left: 16.66667%; } .col-lg-offset-3 { margin-left: 25%; } @@ -3688,13 +3703,13 @@ td.actions { min-width: 200px; } .tree .tree-item-disable, .tree .tree-folder-name-disable { color: #cccccc; } .tree .tree-item-disable:hover, .tree .tree-folder-name-disable:hover { color: #cccccc; background-color: none; } -.tree-actions { padding-bottom: 4px; display: inline-block; } +.tree-actions { display: inline-block; } .tree-panel-heading-controls { margin: -20px -20px 20px; padding: 5px; border-bottom: solid 1px #dfdfdf; } label.control-label { font-size: 13px; font-weight: normal; color: #666666; } -label.control-label span.label-tooltip { text-decoration: none; font-size: 13px; background-color: #ebebeb; border: none; border-bottom: solid 1px #dfdfdf; padding: 0 5px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } +label.control-label span.label-tooltip { text-decoration: none; font-size: 13px; color: #3586ae; background-color: #edf7fb; border: none; border-bottom: solid 1px #d8edf7; padding: 0 5px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } label.required:before { content: "*"; color: red; font-size: 14px; position: relative; line-height: 12px; } @@ -3767,7 +3782,7 @@ textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[ty .switch .slide-button, .toggle p span { display: none; } -.switch { background-color: #d2d2d2; border-radius: 3px; } +.switch { background-color: #e9e9e9; border-radius: 3px; } .switch label { padding: 0; cursor: pointer; } @media only screen { .toggle { position: relative; padding: 0; margin-left: 100px; } @@ -3801,10 +3816,10 @@ textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[ty .toggle input:checked ~ .slide-button { right: 50%; } .toggle input:focus ~ .slide-button, .switch input:focus + label { outline: 1px dotted #888888; } .switch, .toggle { -webkit-animation: bugfix infinite 1s; } - .prestashop-switch { min-width: 150px; color: #666666; text-align: center; border-radius: 3px; -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px 1px inset; box-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px 1px inset; } + .prestashop-switch { min-width: 150px; color: #999999; text-align: center; border-radius: 3px; -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px 1px inset; box-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px 1px inset; } .prestashop-switch label { padding-top: 0 !important; font-weight: 500; } .prestashop-switch input:checked + label { color: #333333 !important; text-shadow: rgba(255, 255, 255, 0.7) 1px 1px 0; } - .prestashop-switch input:not(:checked) + label i { color: #666666 !important; } + .prestashop-switch input:not(:checked) + label i { color: #999999 !important; } .prestashop-switch .slide-button { position: relative; margin-right: 3px; color: white; } .prestashop-switch p { color: #333333; } .prestashop-switch span { color: white; } } diff --git a/admin-dev/themes/default/js/modernizr-loads.js b/admin-dev/themes/default/js/modernizr-loads.js new file mode 100644 index 000000000..299598385 --- /dev/null +++ b/admin-dev/themes/default/js/modernizr-loads.js @@ -0,0 +1,8 @@ +Modernizr.load([ + { + test: window.matchMedia, + nope: ["themes/default/js/vendor/matchMedia.js", "themes/default/js/vendor/matchMedia.addListener.js"] + }, + "themes/default/js/vendor/enquire.js", + "themes/default/js/admin-theme.js" +]); \ No newline at end of file diff --git a/admin-dev/themes/default/js/vendor/matchMedia.addListener.js b/admin-dev/themes/default/js/vendor/matchMedia.addListener.js new file mode 100644 index 000000000..764232d94 --- /dev/null +++ b/admin-dev/themes/default/js/vendor/matchMedia.addListener.js @@ -0,0 +1,75 @@ +/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */ +(function(){ + // Bail out for browsers that have addListener support + if (window.matchMedia && window.matchMedia('all').addListener) { + return false; + } + + var localMatchMedia = window.matchMedia, + hasMediaQueries = localMatchMedia('only all').matches, + isListening = false, + timeoutID = 0, // setTimeout for debouncing 'handleChange' + queries = [], // Contains each 'mql' and associated 'listeners' if 'addListener' is used + handleChange = function(evt) { + // Debounce + clearTimeout(timeoutID); + + timeoutID = setTimeout(function() { + for (var i = 0, il = queries.length; i < il; i++) { + var mql = queries[i].mql, + listeners = queries[i].listeners || [], + matches = localMatchMedia(mql.media).matches; + + // Update mql.matches value and call listeners + // Fire listeners only if transitioning to or from matched state + if (matches !== mql.matches) { + mql.matches = matches; + + for (var j = 0, jl = listeners.length; j < jl; j++) { + listeners[j].call(window, mql); + } + } + } + }, 30); + }; + + window.matchMedia = function(media) { + var mql = localMatchMedia(media), + listeners = [], + index = 0; + + mql.addListener = function(listener) { + // Changes would not occur to css media type so return now (Affects IE <= 8) + if (!hasMediaQueries) { + return; + } + + // Set up 'resize' listener for browsers that support CSS3 media queries (Not for IE <= 8) + // There should only ever be 1 resize listener running for performance + if (!isListening) { + isListening = true; + window.addEventListener('resize', handleChange, true); + } + + // Push object only if it has not been pushed already + if (index === 0) { + index = queries.push({ + mql : mql, + listeners : listeners + }); + } + + listeners.push(listener); + }; + + mql.removeListener = function(listener) { + for (var i = 0, il = listeners.length; i < il; i++){ + if (listeners[i] === listener){ + listeners.splice(i, 1); + } + } + }; + + return mql; + }; +}()); diff --git a/admin-dev/themes/default/js/vendor/matchMedia.js b/admin-dev/themes/default/js/vendor/matchMedia.js new file mode 100644 index 000000000..0bfca11e6 --- /dev/null +++ b/admin-dev/themes/default/js/vendor/matchMedia.js @@ -0,0 +1,46 @@ +/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */ + +window.matchMedia || (window.matchMedia = function() { + "use strict"; + + // For browsers that support matchMedium api such as IE 9 and webkit + var styleMedia = (window.styleMedia || window.media); + + // For those that don't support matchMedium + if (!styleMedia) { + var style = document.createElement('style'), + script = document.getElementsByTagName('script')[0], + info = null; + + style.type = 'text/css'; + style.id = 'matchmediajs-test'; + + script.parentNode.insertBefore(style, script); + + // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers + info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle; + + styleMedia = { + matchMedium: function(media) { + var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; + + // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers + if (style.styleSheet) { + style.styleSheet.cssText = text; + } else { + style.textContent = text; + } + + // Test if media query is true or false + return info.width === '1px'; + } + }; + } + + return function(media) { + return { + matches: styleMedia.matchMedium(media || 'all'), + media: media || 'all' + }; + }; +}()); diff --git a/admin-dev/themes/default/js/vendor/modernizr.js b/admin-dev/themes/default/js/vendor/modernizr.js new file mode 100644 index 000000000..f67462315 --- /dev/null +++ b/admin-dev/themes/default/js/vendor/modernizr.js @@ -0,0 +1,4 @@ +/* Modernizr 2.6.3 (Custom Build) | MIT & BSD + * Build: http://modernizr.com/download/#-shiv-cssclasses-load + */ +;window.Modernizr=function(a,b,c){function u(a){j.cssText=a}function v(a,b){return u(prefixes.join(a+";")+(b||""))}function w(a,b){return typeof a===b}function x(a,b){return!!~(""+a).indexOf(b)}function y(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:w(f,"function")?f.bind(d||b):f}return!1}var d="2.6.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m={},n={},o={},p=[],q=p.slice,r,s={}.hasOwnProperty,t;!w(s,"undefined")&&!w(s.call,"undefined")?t=function(a,b){return s.call(a,b)}:t=function(a,b){return b in a&&w(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=q.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(q.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(q.call(arguments)))};return e});for(var z in m)t(m,z)&&(r=z.toLowerCase(),e[r]=m[z](),p.push((e[r]?"":"no-")+r));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)t(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},u(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+p.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f{if isset($toolbar)}{$toolbar}{/if} +
{if isset($toolbar)}{$toolbar}{/if}
diff --git a/admin-dev/themes/default/template/controllers/products/images.tpl b/admin-dev/themes/default/template/controllers/products/images.tpl index dc9458b16..5e55b7e7b 100644 --- a/admin-dev/themes/default/template/controllers/products/images.tpl +++ b/admin-dev/themes/default/template/controllers/products/images.tpl @@ -52,6 +52,7 @@ {l s='Legend:'} +
{foreach from=$languages item=language} {if $languages|count > 1}
@@ -81,6 +82,7 @@
{/if} {/foreach} +
diff --git a/admin-dev/themes/default/template/controllers/products/informations.tpl b/admin-dev/themes/default/template/controllers/products/informations.tpl index 6bbc59090..dc74df214 100644 --- a/admin-dev/themes/default/template/controllers/products/informations.tpl +++ b/admin-dev/themes/default/template/controllers/products/informations.tpl @@ -321,14 +321,12 @@
-
{include file="controllers/products/textarea_lang.tpl" languages=$languages input_name='description_short' input_value=$product->description_short max=$PS_PRODUCT_SHORT_DESC_LIMIT} -
@@ -341,12 +339,10 @@
-
{include file="controllers/products/textarea_lang.tpl" languages=$languages input_name='description' input_value=$product->description} -
diff --git a/admin-dev/themes/default/template/controllers/products/quantities.tpl b/admin-dev/themes/default/template/controllers/products/quantities.tpl index c7a0abbde..76ed49351 100644 --- a/admin-dev/themes/default/template/controllers/products/quantities.tpl +++ b/admin-dev/themes/default/template/controllers/products/quantities.tpl @@ -44,7 +44,7 @@ -
is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct"> +
is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">

{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}

{/if} -
+
@@ -128,7 +128,7 @@
-
+

@@ -195,12 +195,10 @@

-
- {include file="controllers/products/input_text_lang.tpl" - languages=$languages - input_value=$product->available_now - input_name='available_now'} -
+ {include file="controllers/products/input_text_lang.tpl" + languages=$languages + input_value=$product->available_now + input_name='available_now'}
@@ -213,12 +211,10 @@
-
- {include file="controllers/products/input_text_lang.tpl" - languages=$languages - input_value=$product->available_later - input_name='available_later'} -
+ {include file="controllers/products/input_text_lang.tpl" + languages=$languages + input_value=$product->available_later + input_name='available_later'}
diff --git a/admin-dev/themes/default/template/helpers/tree/tree_header.tpl b/admin-dev/themes/default/template/helpers/tree/tree_header.tpl index d7c8ef7a3..7ab49a6bc 100644 --- a/admin-dev/themes/default/template/helpers/tree/tree_header.tpl +++ b/admin-dev/themes/default/template/helpers/tree/tree_header.tpl @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -
+
{if isset($toolbar)}{$toolbar}{/if}
\ No newline at end of file diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 16a1c5f9a..0908bf0fa 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -52,6 +52,7 @@ class AdminControllerCore extends Controller /** @var string Object identifier inside the associated table */ protected $identifier = false; + protected $identifier_name = 'name'; /** @var string Tab name */ public $className; @@ -1119,8 +1120,6 @@ class AdminControllerCore extends Controller if (!is_array($this->toolbar_title)) $this->toolbar_title = array($this->toolbar_title); - $title = implode(' '.Configuration::get('PS_NAVIGATION_PIPE').' ', $this->toolbar_title); - switch ($this->display) { case 'view': @@ -1135,9 +1134,14 @@ class AdminControllerCore extends Controller 'href' => $back, 'desc' => $this->l('Back to list') ); + $obj = $this->loadObject(true); + if (Validate::isLoadedObject($obj) && isset($obj->{$this->identifier_name}) && !empty($obj->{$this->identifier_name})) + { + array_pop($this->toolbar_title); + $this->toolbar_title[] = is_array($obj->{$this->identifier_name}) ? $obj->{$this->identifier_name}[$this->context->employee->id_lang] : $obj->{$this->identifier_name}; + } break; case 'add': - case 'edit': // Default save button - action dynamically handled in javascript $this->page_header_toolbar_btn['save'] = array( 'href' => '#', @@ -1154,6 +1158,14 @@ class AdminControllerCore extends Controller 'href' => $back, 'desc' => $this->l('Cancel') ); + case 'edit': + $obj = $this->loadObject(true); + if (Validate::isLoadedObject($obj) && isset($obj->{$this->identifier_name}) && !empty($obj->{$this->identifier_name})) + { + array_pop($this->toolbar_title); + $this->toolbar_title[] = sprintf($this->l('Edit: %s'), + is_array($obj->{$this->identifier_name}) ? $obj->{$this->identifier_name}[$this->context->employee->id_lang] : $obj->{$this->identifier_name}); + } break; case 'options': // Default save button - action dynamically handled in javascript @@ -1163,6 +1175,8 @@ class AdminControllerCore extends Controller ); } + $title = implode(' '.Configuration::get('PS_NAVIGATION_PIPE').' ', $this->toolbar_title); + if (is_array($this->page_header_toolbar_btn) && $this->page_header_toolbar_btn instanceof Traversable || trim($title) != '') @@ -1959,8 +1973,8 @@ class AdminControllerCore extends Controller //loads specific javascripts for the admin theme, bootstrap.js should be moved into /js root directory $this->addJS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/js/vendor/bootstrap.js'); - $this->addJS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/js/vendor/enquire.js'); - $this->addJS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/js/admin-theme.js'); + $this->addJS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/js/vendor/modernizr.js'); + $this->addJS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/js/modernizr-loads.js'); if (!Tools::getValue('submitFormAjax')) { diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index 6ee52154d..de4877ab0 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -160,16 +160,14 @@ class AdminCategoriesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) - { + parent::initPageHeaderToolbar(); + + if ($this->display != 'add') $this->page_header_toolbar_btn['new_category'] = array( 'href' => self::$currentIndex.'&addcategory&token='.$this->token, 'desc' => $this->l('Add new category'), 'icon' => 'process-icon-new' ); - } - - parent::initPageHeaderToolbar(); } public function initContent() diff --git a/controllers/admin/AdminEmployeesController.php b/controllers/admin/AdminEmployeesController.php index 28d83105f..d4152e260 100644 --- a/controllers/admin/AdminEmployeesController.php +++ b/controllers/admin/AdminEmployeesController.php @@ -150,6 +150,8 @@ class AdminEmployeesControllerCore extends AdminController public function initPageHeaderToolbar() { + parent::initPageHeaderToolbar(); + if (empty($this->display)) $this->page_header_toolbar_btn['new_employee'] = array( 'href' => self::$currentIndex.'&addemployee&token='.$this->token, @@ -157,7 +159,16 @@ class AdminEmployeesControllerCore extends AdminController 'icon' => 'process-icon-new' ); - parent::initPageHeaderToolbar(); + if ($this->display == 'edit') + { + $obj = $this->loadObject(true); + if (Validate::isLoadedObject($obj)) + { + array_pop($this->toolbar_title); + $this->toolbar_title[] = sprintf($this->l('Edit: %1$s %2$s'), $obj->lastname, $obj->firstname); + $this->page_header_toolbar_title = implode(' '.Configuration::get('PS_NAVIGATION_PIPE').' ', $this->toolbar_title); + } + } } public function renderList() diff --git a/controllers/admin/AdminMetaController.php b/controllers/admin/AdminMetaController.php index 92aa510e6..75eea4162 100644 --- a/controllers/admin/AdminMetaController.php +++ b/controllers/admin/AdminMetaController.php @@ -36,6 +36,7 @@ class AdminMetaControllerCore extends AdminController parent::__construct(); $this->bootstrap = true; + $this->identifier_name = 'page'; $this->ht_file = _PS_ROOT_DIR_.'/.htaccess'; $this->rb_file = _PS_ROOT_DIR_.'/robots.txt'; $this->sm_file = _PS_ROOT_DIR_.'/sitemap.xml'; diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index b8deeb6ba..d274cbec7 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2414,6 +2414,7 @@ class AdminProductsControllerCore extends AdminController if ($this->tabAccess['add'] && $this->display != 'add') $this->page_header_toolbar_btn['duplicate'] = array( 'short' => 'Duplicate', + 'href' => '#', 'desc' => $this->l('Duplicate'), 'confirm' => 1, 'js' => 'if (confirm(\''.$this->l('Also copy images').' ?\')) document.location = \''.$this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)$product->id.'&duplicateproduct\'; else document.location = \''.$this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)$product->id.'&duplicateproduct&noimage=1\';' diff --git a/controllers/admin/AdminSearchConfController.php b/controllers/admin/AdminSearchConfController.php index 0f9346dba..b7e601225 100644 --- a/controllers/admin/AdminSearchConfController.php +++ b/controllers/admin/AdminSearchConfController.php @@ -199,7 +199,7 @@ class AdminSearchConfControllerCore extends AdminController 'desc' => $this->l('Add new alias'), 'icon' => 'process-icon-new' ); - + $this->identifier_name = 'alias'; parent::initPageHeaderToolbar(); } diff --git a/controllers/admin/AdminSearchEnginesController.php b/controllers/admin/AdminSearchEnginesController.php index 7a571324b..df28cdcfc 100644 --- a/controllers/admin/AdminSearchEnginesController.php +++ b/controllers/admin/AdminSearchEnginesController.php @@ -86,6 +86,8 @@ class AdminSearchEnginesControllerCore extends AdminController 'desc' => $this->l('Add new search engine'), 'icon' => 'process-icon-new' ); + + $this->identifier_name = 'server'; parent::initPageHeaderToolbar(); } diff --git a/modules/dashactivity/dashactivity.php b/modules/dashactivity/dashactivity.php index 6b9d67a5f..bb030de49 100644 --- a/modules/dashactivity/dashactivity.php +++ b/modules/dashactivity/dashactivity.php @@ -87,7 +87,8 @@ class Dashactivity extends Module 'gapi_mode' => $gapi_mode, 'dashactivity_config_form' => $this->renderConfigForm(), 'date_subtitle' => $this->l('(from %s to %s)'), - 'date_format' => $this->context->language->date_format_lite + 'date_format' => $this->context->language->date_format_lite, + 'link' => $this->context->link, ), $this->getConfigFieldsValues())); return $this->display(__FILE__, 'dashboard_zone_one.tpl'); } @@ -311,33 +312,49 @@ class Dashactivity extends Module ), ); - $sub_widget = array( - array('label' => $this->l('Show Pending'), 'config_name' => 'DASHACTIVITY_SHOW_PENDING'), - array('label' => $this->l('Show Notifications'), 'config_name' => 'DASHACTIVITY_SHOW_NOTIFICATION'), - array('label' => $this->l('Show Clients'), 'config_name' => 'DASHACTIVITY_SHOW_CUSTOMERS'), - array('label' => $this->l('Show Newsletters'), 'config_name' => 'DASHACTIVITY_SHOW_NEWSLETTER'), - array('label' => $this->l('Show Traffic'), 'config_name' => 'DASHACTIVITY_SHOW_TRAFFIC'), - ); - - foreach($sub_widget as $widget) - $fields_form['form']['input'][] = array( - 'type' => 'switch', - 'label' => $widget['label'], - 'name' => $widget['config_name'], - 'is_bool' => true, - 'values' => array( - array( - 'id' => 'active_on', - 'value' => 1, - 'label' => $this->l('Enabled') + $fields_form['form']['input'][] = array( + 'label' => $this->l('Cart as active'), + 'desc' => $this->l('Default time range to consider a Shopping cart as active (default 30, max 120)'), + 'name' => 'DASHACTIVITY_CART_ACTIVE', + 'type' => 'select', + 'options' => array( + 'query' => array( + array('id' => 15, 'name' => 15), + array('id' => 30, 'name' => 30), + array('id' => 45, 'name' => 45), + array('id' => 60, 'name' => 60), + array('id' => 90, 'name' => 90), + array('id' => 120, 'name' => 120), ), - array( - 'id' => 'active_off', - 'value' => 0, - 'label' => $this->l('Disabled') - ) - ), - ); + 'id' => 'id', + 'name' => 'name', + ), + ); + $fields_form['form']['input'][] = array( + 'label' => $this->l('Visitor online'), + 'desc' => $this->l('Default time range to consider a Visitor as online (default 30, max 120)'), + 'name' => 'DASHACTIVITY_VISITOR_ONLINE', + 'type' => 'select', + 'options' => array( + 'query' => array( + array('id' => 15, 'name' => 15), + array('id' => 30, 'name' => 30), + array('id' => 45, 'name' => 45), + array('id' => 60, 'name' => 60), + array('id' => 90, 'name' => 90), + array('id' => 120, 'name' => 120), + ), + 'id' => 'id', + 'name' => 'name', + ), + ); + $fields_form['form']['input'][] = array( + 'label' => $this->l('Cart abandoned'), + 'desc' => $this->l('Default time range to consider a Shopping cart as abandoned (default 24hrs)'), + 'name' => 'DASHACTIVITY_CART_ABANDONED', + 'type' => 'text', + 'suffix' => $this->l('hrs'), + ); $helper = new HelperForm(); $helper->show_toolbar = false; @@ -361,13 +378,9 @@ class Dashactivity extends Module public function getConfigFieldsValues() { return array( - 'DASHACTIVITY_SHOW_STOCK' => Configuration::get('PS_STOCK_MANAGEMENT'), - 'DASHACTIVITY_SHOW_RETURNS' => Configuration::get('PS_ORDER_RETURN'), - 'DASHACTIVITY_SHOW_PENDING' => Tools::getValue('DASHACTIVITY_SHOW_PENDING', Configuration::get('DASHACTIVITY_SHOW_PENDING')), - 'DASHACTIVITY_SHOW_NOTIFICATION' => Tools::getValue('DASHACTIVITY_SHOW_NOTIFICATION', Configuration::get('DASHACTIVITY_SHOW_NOTIFICATION')), - 'DASHACTIVITY_SHOW_CUSTOMERS' => Tools::getValue('DASHACTIVITY_SHOW_CUSTOMERS', Configuration::get('DASHACTIVITY_SHOW_CUSTOMERS')), - 'DASHACTIVITY_SHOW_NEWSLETTER' => Tools::getValue('DASHACTIVITY_SHOW_NEWSLETTER', Configuration::get('DASHACTIVITY_SHOW_NEWSLETTER')), - 'DASHACTIVITY_SHOW_TRAFFIC' => Tools::getValue('DASHACTIVITY_SHOW_TRAFFIC', Configuration::get('DASHACTIVITY_SHOW_TRAFFIC')), + 'DASHACTIVITY_CART_ACTIVE' => Tools::getValue('DASHACTIVITY_CART_ACTIVE', Configuration::get('DASHACTIVITY_CART_ACTIVE')), + 'DASHACTIVITY_CART_ABANDONED' => Tools::getValue('DASHACTIVITY_CART_ABANDONED', Configuration::get('DASHACTIVITY_CART_ABANDONED')), + 'DASHACTIVITY_VISITOR_ONLINE' => Tools::getValue('DASHACTIVITY_VISITOR_ONLINE', Configuration::get('DASHACTIVITY_VISITOR_ONLINE')), ); } diff --git a/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl b/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl index e96fba8f8..6f242d1cf 100644 --- a/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl +++ b/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl @@ -64,7 +64,6 @@ - {if $DASHACTIVITY_SHOW_PENDING}
{l s='Currently Pending' mod='dashactivity'}
    @@ -74,32 +73,26 @@ - {if $DASHACTIVITY_SHOW_RETURNS}
  • {l s='Return/Exchanges' mod='dashactivity'}
  • - {/if}
  • {l s='Abandoned Carts' mod='dashactivity'}
  • - {if $DASHACTIVITY_SHOW_STOCK}
  • {l s='Products Out of Stock' mod='dashactivity'}
  • - {/if}
- {/if} - {if $DASHACTIVITY_SHOW_NOTIFICATION}
{l s='Notifications' mod='dashactivity'}
    @@ -123,8 +116,6 @@
- {/if} - {if $DASHACTIVITY_SHOW_CUSTOMERS}
{l s='Customers & Newsletters' mod='dashactivity'}
    @@ -148,8 +139,6 @@
- {/if} - {if $DASHACTIVITY_SHOW_TRAFFIC}
{l s='Traffic' mod='dashactivity'} @@ -184,9 +173,7 @@
- {/if} -