diff --git a/themes/zuitedesk/css/bootstrap-tour.min.css b/themes/zuitedesk/css/bootstrap-tour.min.css index 0d30adb..8ebd3d3 100644 --- a/themes/zuitedesk/css/bootstrap-tour.min.css +++ b/themes/zuitedesk/css/bootstrap-tour.min.css @@ -1,19 +1,22 @@ -/* =========================================================== -# bootstrap-tour - v0.9.3 -# http://bootstraptour.com -# ============================================================== -# Copyright 2012-2013 Ulrich Sossou -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -*/ -.tour-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;background-color:#000;opacity:.8}.tour-step-backdrop{position:relative;z-index:1101;background:inherit}.tour-step-background{position:absolute;z-index:1100;background:inherit;border-radius:6px}.popover[class*=tour-]{z-index:1100}.popover[class*=tour-] .popover-navigation{padding:9px 14px}.popover[class*=tour-] .popover-navigation [data-role=end]{float:right}.popover[class*=tour-] .popover-navigation [data-role=prev],.popover[class*=tour-] .popover-navigation [data-role=next],.popover[class*=tour-] .popover-navigation [data-role=end]{cursor:pointer}.popover[class*=tour-] .popover-navigation [data-role=prev].disabled,.popover[class*=tour-] .popover-navigation [data-role=next].disabled,.popover[class*=tour-] .popover-navigation [data-role=end].disabled{cursor:default}.popover[class*=tour-].orphan{position:fixed;margin-top:0}.popover[class*=tour-].orphan .arrow{display:none} \ No newline at end of file +/* ======================================================================== + * bootstrap-tour - v0.10.3 + * http://bootstraptour.com + * ======================================================================== + * Copyright 2012-2015 Ulrich Sossou + * + * ======================================================================== + * Licensed under the MIT License (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://opensource.org/licenses/MIT + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== + */ + +.tour-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;background-color:#000;opacity:.8;filter:alpha(opacity=80)}.tour-step-backdrop{position:relative;z-index:1101}.tour-step-backdrop>td{position:relative;z-index:1101}.tour-step-background{position:absolute!important;z-index:1100;background:inherit;border-radius:6px}.popover[class*=tour-]{z-index:1102}.popover[class*=tour-] .popover-navigation{padding:9px 14px;overflow:hidden}.popover[class*=tour-] .popover-navigation [data-role=end]{float:right}.popover[class*=tour-] .popover-navigation [data-role=prev],.popover[class*=tour-] .popover-navigation [data-role=next],.popover[class*=tour-] .popover-navigation [data-role=end]{cursor:pointer}.popover[class*=tour-] .popover-navigation [data-role=prev].disabled,.popover[class*=tour-] .popover-navigation [data-role=next].disabled,.popover[class*=tour-] .popover-navigation [data-role=end].disabled{cursor:default}.popover[class*=tour-].orphan{position:fixed;margin-top:0}.popover[class*=tour-].orphan .arrow{display:none} \ No newline at end of file diff --git a/themes/zuitedesk/js/bootstrap-tour.min.js b/themes/zuitedesk/js/bootstrap-tour.min.js index 20bbd46..7d6f9d9 100644 --- a/themes/zuitedesk/js/bootstrap-tour.min.js +++ b/themes/zuitedesk/js/bootstrap-tour.min.js @@ -1,19 +1,22 @@ -/* =========================================================== -# bootstrap-tour - v0.9.3 -# http://bootstraptour.com -# ============================================================== -# Copyright 2012-2013 Ulrich Sossou -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -*/ -!function(a,b){var c,d;return d=b.document,c=function(){function c(c){var d;try{d=b.localStorage}catch(e){d=!1}this._options=a.extend({name:"tour",steps:[],container:"body",keyboard:!0,storage:d,debug:!1,backdrop:!1,redirect:!0,orphan:!1,duration:!1,basePath:"",template:"

",afterSetState:function(){},afterGetState:function(){},afterRemoveState:function(){},onStart:function(){},onEnd:function(){},onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNext:function(){},onPrev:function(){},onPause:function(){},onResume:function(){}},c),this._force=!1,this._inited=!1,this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return c.prototype.addSteps=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)b=a[c],this.addStep(b);return this},c.prototype.addStep=function(a){return this._options.steps.push(a),this},c.prototype.getStep=function(b){return null!=this._options.steps[b]?a.extend({id:"step-"+b,path:"",placement:"right",title:"",content:"

",next:b===this._options.steps.length-1?-1:b+1,prev:b-1,animation:!0,container:this._options.container,backdrop:this._options.backdrop,redirect:this._options.redirect,orphan:this._options.orphan,duration:this._options.duration,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume},this._options.steps[b]):void 0},c.prototype.init=function(a){return this._force=a,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(a){return function(){return a.showStep(a._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},c.prototype.start=function(a){var b;return null==a&&(a=!1),this._inited||this.init(a),null===this._current&&(b=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(b,this.showStep,0)),this},c.prototype.next=function(){var a;return a=this.hideStep(this._current),this._callOnPromiseDone(a,this._showNextStep)},c.prototype.prev=function(){var a;return a=this.hideStep(this._current),this._callOnPromiseDone(a,this._showPrevStep)},c.prototype.goTo=function(a){var b;return b=this.hideStep(this._current),this._callOnPromiseDone(b,this.showStep,a)},c.prototype.end=function(){var c,e;return c=function(c){return function(){return a(d).off("click.tour-"+c._options.name),a(d).off("keyup.tour-"+c._options.name),a(b).off("resize.tour-"+c._options.name),c._setState("end","yes"),c._inited=!1,c._force=!1,c._clearTimer(),null!=c._options.onEnd?c._options.onEnd(c):void 0}}(this),e=this.hideStep(this._current),this._callOnPromiseDone(e,c)},c.prototype.ended=function(){return!this._force&&!!this._getState("end")},c.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this.start()},c.prototype.pause=function(){var a;return a=this.getStep(this._current),a&&a.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,b.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=a.onPause?a.onPause(this,this._duration):void 0):this},c.prototype.resume=function(){var a;return a=this.getStep(this._current),a&&a.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||a.duration,this._timer=b.setTimeout(function(a){return function(){return a._isLast()?a.next():a.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=a.onResume&&this._duration!==a.duration?a.onResume(this,this._duration):void 0):this},c.prototype.hideStep=function(b){var c,d,e;return(e=this.getStep(b))?(this._clearTimer(),d=this._makePromise(null!=e.onHide?e.onHide(this,b):void 0),c=function(c){return function(){var d;return d=a(e.element),d.data("bs.popover")||d.data("popover")||(d=a("body")),d.popover("destroy").removeClass("tour-"+c._options.name+"-element tour-"+c._options.name+"-"+b+"-element"),e.reflex&&d.css("cursor","").off("click.tour-"+c._options.name),e.backdrop&&c._hideBackdrop(),null!=e.onHidden?e.onHidden(c):void 0}}(this),this._callOnPromiseDone(d,c),d):void 0},c.prototype.showStep=function(a){var b,c,e,f;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(f=this.getStep(a))?(e=a").parent().html(),d.popover({placement:b.placement,trigger:"manual",title:b.title,content:b.content,html:!0,animation:b.animation,container:b.container,template:b.template,selector:b.element}).popover("show"),g=d.data("bs.popover")?d.data("bs.popover").tip():d.data("popover").tip(),g.attr("id",b.id),this._reposition(g,b),h?this._center(g):void 0},c.prototype._reposition=function(b,c){var e,f,g,h,i,j,k;if(h=b[0].offsetWidth,f=b[0].offsetHeight,k=b.offset(),i=k.left,j=k.top,e=a(d).outerHeight()-k.top-b.outerHeight(),0>e&&(k.top=k.top+e),g=a("html").outerWidth()-k.left-b.outerWidth(),0>g&&(k.left=k.left+g),k.top<0&&(k.top=0),k.left<0&&(k.left=0),b.offset(k),"bottom"===c.placement||"top"===c.placement){if(i!==k.left)return this._replaceArrow(b,2*(k.left-i),h,"left")}else if(j!==k.top)return this._replaceArrow(b,2*(k.top-j),f,"top")},c.prototype._center=function(c){return c.css("top",a(b).outerHeight()/2-c.outerHeight()/2)},c.prototype._replaceArrow=function(a,b,c,d){return a.find(".arrow").css(d,b?50*(1-b/c)+"%":"")},c.prototype._scrollIntoView=function(c,d){var e,f,g,h,i,j;return e=a(c),e.length?(f=a(b),h=e.offset().top,j=f.height(),i=Math.max(0,h-j/2),this._debug("Scroll into view. ScrollTop: "+i+". Element offset: "+h+". Window height: "+j+"."),g=0,a("body,html").stop(!0,!0).animate({scrollTop:Math.ceil(i)},function(a){return function(){return 2===++g?(d(),a._debug("Scroll into view. Animation end element offset: "+e.offset().top+". Window height: "+f.height()+".")):void 0}}(this))):d()},c.prototype._onResize=function(c,d){return a(b).on("resize.tour-"+this._options.name,function(){return clearTimeout(d),d=setTimeout(c,100)})},c.prototype._initMouseNavigation=function(){var b;return b=this,a(d).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']:not(.disabled)").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']:not(.disabled)").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']:not(.disabled)",function(a){return function(b){return b.preventDefault(),a.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']:not(.disabled)",function(a){return function(b){return b.preventDefault(),a.prev()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(a){return function(b){return b.preventDefault(),a.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(c){var d;return c.preventDefault(),d=a(this),d.text(d.data(b._paused?"pause-text":"resume-text")),b._paused?b.resume():b.pause()})},c.prototype._initKeyboardNavigation=function(){return this._options.keyboard?a(d).on("keyup.tour-"+this._options.name,function(a){return function(b){if(b.which)switch(b.which){case 39:return b.preventDefault(),a._isLast()?a.next():a.end();case 37:if(b.preventDefault(),a._current>0)return a.prev();break;case 27:return b.preventDefault(),a.end()}}}(this)):void 0},c.prototype._makePromise=function(b){return b&&a.isFunction(b.then)?b:null},c.prototype._callOnPromiseDone=function(a,b,c){return a?a.then(function(a){return function(){return b.call(a,c)}}(this)):b.call(this,c)},c.prototype._showBackdrop=function(){return this.backdrop.backgroundShown?void 0:(this.backdrop=a("
",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,a("body").append(this.backdrop))},c.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},c.prototype._hideBackground=function(){return this.backdrop?(this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1):void 0},c.prototype._showOverlayElement=function(b){var c,d,e;return d=a(b),d&&0!==d.length&&!this.backdrop.overlayElementShown?(this.backdrop.overlayElementShown=!0,c=a("
"),e=d.offset(),e.top=e.top,e.left=e.left,c.width(d.innerWidth()).height(d.innerHeight()).addClass("tour-step-background").offset(e),d.addClass("tour-step-backdrop"),a("body").append(c),this.backdrop.$element=d,this.backdrop.$background=c):void 0},c.prototype._hideOverlayElement=function(){return this.backdrop.overlayElementShown?(this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1):void 0},c.prototype._clearTimer=function(){return b.clearTimeout(this._timer),this._timer=null,this._duration=null},c}(),b.Tour=c}($jq,window); +/* ======================================================================== + * bootstrap-tour - v0.10.3 + * http://bootstraptour.com + * ======================================================================== + * Copyright 2012-2015 Ulrich Sossou + * + * ======================================================================== + * Licensed under the MIT License (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://opensource.org/licenses/MIT + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== + */ + +!function(t,e){return"function"==typeof define&&define.amd?define(["jquery"],function(o){return t.Tour=e(o)}):"object"==typeof exports?module.exports=e(require("$jq")):t.Tour=e(t.$jq)}(window,function(t){var e,o;return o=window.document,e=function(){function e(e){var o;try{o=window.localStorage}catch(n){o=!1}this._options=t.extend({name:"tour",steps:[],container:"body",autoscroll:!0,keyboard:!0,storage:o,debug:!1,backdrop:!1,backdropContainer:"body",backdropPadding:0,redirect:!0,orphan:!1,duration:!1,delay:!1,basePath:"",template:'',afterSetState:function(){},afterGetState:function(){},afterRemoveState:function(){},onStart:function(){},onEnd:function(){},onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNext:function(){},onPrev:function(){},onPause:function(){},onResume:function(){},onRedirectError:function(){}},e),this._force=!1,this._inited=!1,this._current=null,this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return e.prototype.addSteps=function(t){var e,o,n;for(o=0,n=t.length;n>o;o++)e=t[o],this.addStep(e);return this},e.prototype.addStep=function(t){return this._options.steps.push(t),this},e.prototype.getStep=function(e){return null!=this._options.steps[e]?t.extend({id:"step-"+e,path:"",host:"",placement:"right",title:"",content:"

",next:e===this._options.steps.length-1?-1:e+1,prev:e-1,animation:!0,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropContainer:this._options.backdropContainer,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,reflexElement:this._options.steps[e].element,backdropElement:this._options.steps[e].element,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume,onRedirectError:this._options.onRedirectError},this._options.steps[e]):void 0},e.prototype.init=function(t){return this._force=t,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(t){return function(){return t.showStep(t._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},e.prototype.start=function(t){var e;return null==t&&(t=!1),this._inited||this.init(t),null===this._current&&(e=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(e,this.showStep,0)),this},e.prototype.next=function(){var t;return t=this.hideStep(this._current,this._current+1),this._callOnPromiseDone(t,this._showNextStep)},e.prototype.prev=function(){var t;return t=this.hideStep(this._current,this._current-1),this._callOnPromiseDone(t,this._showPrevStep)},e.prototype.goTo=function(t){var e;return e=this.hideStep(this._current,t),this._callOnPromiseDone(e,this.showStep,t)},e.prototype.end=function(){var e,n;return e=function(e){return function(){return t(o).off("click.tour-"+e._options.name),t(o).off("keyup.tour-"+e._options.name),t(window).off("resize.tour-"+e._options.name),e._setState("end","yes"),e._inited=!1,e._force=!1,e._clearTimer(),null!=e._options.onEnd?e._options.onEnd(e):void 0}}(this),n=this.hideStep(this._current),this._callOnPromiseDone(n,e)},e.prototype.ended=function(){return!this._force&&!!this._getState("end")},e.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this._removeState("redirect_to"),this.start()},e.prototype.pause=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,window.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=t.onPause?t.onPause(this,this._duration):void 0):this},e.prototype.resume=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||t.duration,this._timer=window.setTimeout(function(t){return function(){return t._isLast()?t.next():t.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=t.onResume&&this._duration!==t.duration?t.onResume(this,this._duration):void 0):this},e.prototype.hideStep=function(e,o){var n,r,i,s;return(s=this.getStep(e))?(this._clearTimer(),i=this._makePromise(null!=s.onHide?s.onHide(this,e):void 0),r=function(n){return function(){var r,i;return r=t(s.element),r.data("bs.popover")||r.data("popover")||(r=t("body")),r.popover("destroy").removeClass("tour-"+n._options.name+"-element tour-"+n._options.name+"-"+e+"-element").removeData("bs.popover").focus(),s.reflex&&t(s.reflexElement).removeClass("tour-step-element-reflex").off(""+n._reflexEvent(s.reflex)+".tour-"+n._options.name),s.backdrop&&(i=null!=o&&n.getStep(o),i&&i.backdrop&&i.backdropElement===s.backdropElement||n._hideBackdrop()),null!=s.onHidden?s.onHidden(n):void 0}}(this),n=s.delay.hide||s.delay,"[object Number]"==={}.toString.call(n)&&n>0?(this._debug("Wait "+n+" milliseconds to hide the step "+(this._current+1)),window.setTimeout(function(t){return function(){return t._callOnPromiseDone(i,r)}}(this),n)):this._callOnPromiseDone(i,r),i):void 0},e.prototype.showStep=function(t){var e,n,r,i,s,a;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(a=this.getStep(t),a&&(s=t0?(this._debug("Wait "+r+" milliseconds to show the step "+(this._current+1)),window.setTimeout(function(t){return function(){return t._callOnPromiseDone(n,i)}}(this),r)):this._callOnPromiseDone(n,i),n):void 0)},e.prototype.getCurrentStep=function(){return this._current},e.prototype.setCurrentStep=function(t){return null!=t?(this._current=t,this._setState("current_step",t)):(this._current=this._getState("current_step"),this._current=null===this._current?null:parseInt(this._current,10)),this},e.prototype.redraw=function(){return this._showOverlayElement(this.getStep(this.getCurrentStep()).element,!0)},e.prototype._setState=function(t,e){var o,n;if(this._options.storage){n=""+this._options.name+"_"+t;try{this._options.storage.setItem(n,e)}catch(r){o=r,o.code===DOMException.QUOTA_EXCEEDED_ERR&&this._debug("LocalStorage quota exceeded. State storage failed.")}return this._options.afterSetState(n,e)}return null==this._state&&(this._state={}),this._state[t]=e},e.prototype._removeState=function(t){var e;return this._options.storage?(e=""+this._options.name+"_"+t,this._options.storage.removeItem(e),this._options.afterRemoveState(e)):null!=this._state?delete this._state[t]:void 0},e.prototype._getState=function(t){var e,o;return this._options.storage?(e=""+this._options.name+"_"+t,o=this._options.storage.getItem(e)):null!=this._state&&(o=this._state[t]),(void 0===o||"null"===o)&&(o=null),this._options.afterGetState(t,o),o},e.prototype._showNextStep=function(){var t,e,o;return o=this.getStep(this._current),e=function(t){return function(){return t.showStep(o.next)}}(this),t=this._makePromise(null!=o.onNext?o.onNext(this):void 0),this._callOnPromiseDone(t,e)},e.prototype._showPrevStep=function(){var t,e,o;return o=this.getStep(this._current),e=function(t){return function(){return t.showStep(o.prev)}}(this),t=this._makePromise(null!=o.onPrev?o.onPrev(this):void 0),this._callOnPromiseDone(t,e)},e.prototype._debug=function(t){return this._options.debug?window.console.log("Bootstrap Tour '"+this._options.name+"' | "+t):void 0},e.prototype._isRedirect=function(t,e,o){var n;return null!=t&&""!==t&&("[object RegExp]"==={}.toString.call(t)&&!t.test(o.origin)||"[object String]"==={}.toString.call(t)&&this._isHostDifferent(t,o))?!0:(n=[o.pathname,o.search,o.hash].join(""),null!=e&&""!==e&&("[object RegExp]"==={}.toString.call(e)&&!e.test(n)||"[object String]"==={}.toString.call(e)&&this._isPathDifferent(e,n)))},e.prototype._isHostDifferent=function(t,e){switch({}.toString.call(t)){case"[object RegExp]":return!t.test(e.origin);case"[object String]":return this._getProtocol(t)!==this._getProtocol(e.href)||this._getHost(t)!==this._getHost(e.href);default:return!0}},e.prototype._isPathDifferent=function(t,e){return this._getPath(t)!==this._getPath(e)||!this._equal(this._getQuery(t),this._getQuery(e))||!this._equal(this._getHash(t),this._getHash(e))},e.prototype._isJustPathHashDifferent=function(t,e,o){var n;return null!=t&&""!==t&&this._isHostDifferent(t,o)?!1:(n=[o.pathname,o.search,o.hash].join(""),"[object String]"==={}.toString.call(e)?this._getPath(e)===this._getPath(n)&&this._equal(this._getQuery(e),this._getQuery(n))&&!this._equal(this._getHash(e),this._getHash(n)):!1)},e.prototype._redirect=function(e,n,r){var i;return t.isFunction(e.redirect)?e.redirect.call(this,r):(i="[object String]"==={}.toString.call(e.host)?""+e.host+r:r,this._debug("Redirect to "+i),this._getState("redirect_to")!==""+n?(this._setState("redirect_to",""+n),o.location.href=i):(this._debug("Error redirection loop to "+r),this._removeState("redirect_to"),null!=e.onRedirectError?e.onRedirectError(this):void 0))},e.prototype._isOrphan=function(e){return null==e.element||!t(e.element).length||t(e.element).is(":hidden")&&"http://www.w3.org/2000/svg"!==t(e.element)[0].namespaceURI},e.prototype._isLast=function(){return this._current").parent().html()},e.prototype._reflexEvent=function(t){return"[object Boolean]"==={}.toString.call(t)?"click":t},e.prototype._focus=function(t,e,o){var n,r;return r=o?"end":"next",n=t.find("[data-role='"+r+"']"),e.on("shown.bs.popover",function(){return n.focus()})},e.prototype._reposition=function(e,n){var r,i,s,a,u,p,h;if(a=e[0].offsetWidth,i=e[0].offsetHeight,h=e.offset(),u=h.left,p=h.top,r=t(o).outerHeight()-h.top-e.outerHeight(),0>r&&(h.top=h.top+r),s=t("html").outerWidth()-h.left-e.outerWidth(),0>s&&(h.left=h.left+s),h.top<0&&(h.top=0),h.left<0&&(h.left=0),e.offset(h),"bottom"===n.placement||"top"===n.placement){if(u!==h.left)return this._replaceArrow(e,2*(h.left-u),a,"left")}else if(p!==h.top)return this._replaceArrow(e,2*(h.top-p),i,"top")},e.prototype._center=function(e){return e.css("top",t(window).outerHeight()/2-e.outerHeight()/2)},e.prototype._replaceArrow=function(t,e,o,n){return t.find(".arrow").css(n,e?50*(1-e/o)+"%":"")},e.prototype._scrollIntoView=function(e,o){var n,r,i,s,a,u,p;if(n=t(e.element),!n.length)return o();switch(r=t(window),a=n.offset().top,s=n.outerHeight(),p=r.height(),u=0,e.placement){case"top":u=Math.max(0,a-p/2);break;case"left":case"right":u=Math.max(0,a+s/2-p/2);break;case"bottom":u=Math.max(0,a+s-p/2)}return this._debug("Scroll into view. ScrollTop: "+u+". Element offset: "+a+". Window height: "+p+"."),i=0,t("body, html").stop(!0,!0).animate({scrollTop:Math.ceil(u)},function(t){return function(){return 2===++i?(o(),t._debug("Scroll into view.\nAnimation end element offset: "+n.offset().top+".\nWindow height: "+r.height()+".")):void 0}}(this))},e.prototype._onResize=function(e,o){return t(window).on("resize.tour-"+this._options.name,function(){return clearTimeout(o),o=setTimeout(e,100)})},e.prototype._initMouseNavigation=function(){var e;return e=this,t(o).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']",function(t){return function(e){return e.preventDefault(),t.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']",function(t){return function(e){return e.preventDefault(),t._current>0?t.prev():void 0}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(t){return function(e){return e.preventDefault(),t.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(o){var n;return o.preventDefault(),n=t(this),n.text(e._paused?n.data("pause-text"):n.data("resume-text")),e._paused?e.resume():e.pause()})},e.prototype._initKeyboardNavigation=function(){return this._options.keyboard?t(o).on("keyup.tour-"+this._options.name,function(t){return function(e){if(e.which)switch(e.which){case 39:return e.preventDefault(),t._isLast()?t.next():t.end();case 37:if(e.preventDefault(),t._current>0)return t.prev()}}}(this)):void 0},e.prototype._makePromise=function(e){return e&&t.isFunction(e.then)?e:null},e.prototype._callOnPromiseDone=function(t,e,o){return t?t.then(function(t){return function(){return e.call(t,o)}}(this)):e.call(this,o)},e.prototype._showBackdrop=function(e){return this.backdrop.backgroundShown?void 0:(this.backdrop=t("
",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,t(e.backdropContainer).append(this.backdrop))},e.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},e.prototype._hideBackground=function(){return this.backdrop&&this.backdrop.remove?(this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1):void 0},e.prototype._showOverlayElement=function(e,o){var n,r,i;return r=t(e.element),n=t(e.backdropElement),!r||0===r.length||this.backdrop.overlayElementShown&&!o?void 0:(this.backdrop.overlayElementShown||(this.backdrop.$element=n.addClass("tour-step-backdrop"),this.backdrop.$background=t("
",{"class":"tour-step-background"}),this.backdrop.$background.appendTo(e.backdropContainer),this.backdrop.overlayElementShown=!0),i={width:n.innerWidth(),height:n.innerHeight(),offset:n.offset()},e.backdropPadding&&(i=this._applyBackdropPadding(e.backdropPadding,i)),this.backdrop.$background.width(i.width).height(i.height).offset(i.offset))},e.prototype._hideOverlayElement=function(){return this.backdrop.overlayElementShown?(this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1):void 0},e.prototype._applyBackdropPadding=function(t,e){return"object"==typeof t?(null==t.top&&(t.top=0),null==t.right&&(t.right=0),null==t.bottom&&(t.bottom=0),null==t.left&&(t.left=0),e.offset.top=e.offset.top-t.top,e.offset.left=e.offset.left-t.left,e.width=e.width+t.left+t.right,e.height=e.height+t.top+t.bottom):(e.offset.top=e.offset.top-t,e.offset.left=e.offset.left-t,e.width=e.width+2*t,e.height=e.height+2*t),e},e.prototype._clearTimer=function(){return window.clearTimeout(this._timer),this._timer=null,this._duration=null},e.prototype._getProtocol=function(t){return t=t.split("://"),t.length>1?t[0]:"http"},e.prototype._getHost=function(t){return t=t.split("//"),t=t.length>1?t[1]:t[0],t.split("/")[0]},e.prototype._getPath=function(t){return t.replace(/\/?$/,"").split("?")[0].split("#")[0]},e.prototype._getQuery=function(t){return this._getParams(t,"?")},e.prototype._getHash=function(t){return this._getParams(t,"#")},e.prototype._getParams=function(t,e){var o,n,r,i,s;if(n=t.split(e),1===n.length)return{};for(n=n[1].split("&"),r={},i=0,s=n.length;s>i;i++)o=n[i],o=o.split("="),r[o[0]]=o[1]||"";return r},e.prototype._equal=function(t,e){var o,n,r,i,s,a;if("[object Object]"==={}.toString.call(t)&&"[object Object]"==={}.toString.call(e)){if(n=Object.keys(t),r=Object.keys(e),n.length!==r.length)return!1;for(o in t)if(i=t[o],!this._equal(e[o],i))return!1;return!0}if("[object Array]"==={}.toString.call(t)&&"[object Array]"==={}.toString.call(e)){if(t.length!==e.length)return!1;for(o=s=0,a=t.length;a>s;o=++s)if(i=t[o],!this._equal(i,e[o]))return!1;return!0}return t===e},e}()}); diff --git a/themes/zuitedesk/js/runapp.js b/themes/zuitedesk/js/runapp.js index 5ed16c1..95f2344 100644 --- a/themes/zuitedesk/js/runapp.js +++ b/themes/zuitedesk/js/runapp.js @@ -1,6 +1,4 @@ -'use strict'; - -$jq(document).ready(function ($) { +$jq(function () { // Bind to scroll. $(window).scroll(function () { @@ -13,7 +11,7 @@ $jq(document).ready(function ($) { }); // Function for scrolling to top. - $('#scroll-top-link').click(function () { + $('#scroll-top-link').click(function (e) { $("html, body").animate({ scrollTop: 0 }, 600); diff --git a/themes/zuitedesk/js/tourpro.js b/themes/zuitedesk/js/tourmenu.js similarity index 62% rename from themes/zuitedesk/js/tourpro.js rename to themes/zuitedesk/js/tourmenu.js index 4af7eb2..f99012f 100644 --- a/themes/zuitedesk/js/tourpro.js +++ b/themes/zuitedesk/js/tourmenu.js @@ -1,72 +1,79 @@ $jq(function() { - var path, prev, next, endtour, tour, cookie_tour, cookie_value; + // Destination, relative path starting with a slash. + var path = '/'; - path = location.pathname.substring(0, 8); - if (path != "/en" && path != "/en/") path = "/"; + var langPath = location.pathname.replace(/^\/+/, '') + '/'; + var basePath = Drupal.settings.basePath ? Drupal.settings.basePath : ''; + basePath = basePath == '/' ? '' : basePath; + if (basePath.length > 0 && langPath.indexOf(basePath) == 0) { + langPath = langPath.substring(basePath.length); + } + langPath = langPath.substring(0, langPath.indexOf('/')); + path = langPath.length == 2 ? basePath + '/' + langPath + path : basePath + path; - prev = Drupal.t("« Prev"); - next = Drupal.t("Next »"); - endtour = Drupal.t("End Tour"); + var prev = Drupal.t("« Prev"); + var next = Drupal.t("Next »"); + var endtour = Drupal.t("End Tour"); - tour = new Tour({ - template: "
\ -
\ -

\ -
\ -
\ -
\ - \ - \ + var tour = new Tour({ + template: '
\ +
\ +

\ +
\ +
\ +
\ + \ + \
\ - \ + \
\ -
", +
', steps: [ { - element: "#user-options", - placement: "left", - title: Drupal.t("Welcome!"), - content: Drupal.t("Remember, here you can see your user profile and main options.") - } , { - path: path, - element: "li.suitedesk", + element: "#logo", placement: "bottom", title: Drupal.t("What is SuiteDesk?"), content: Drupal.t("SuiteDesk is a web based software useful for project management, planning, personal productivity, communication between project stakeholders, collaboration, customers support, documentation, cost control and change management.") } , { path: path, - element: "#stormprojects", + element: "#main-content ul.tabs li:last-child", placement: "bottom", + title: Drupal.t("Welcome!"), + content: Drupal.t("Remember, here you can see your user profile and main options.") + } , { + path: path, + element: "#stormproject-item a:first-child", + placement: "top", title: Drupal.t("Active projects"), content: Drupal.t("Here you can see your projects. At the most basic level, SuiteDesk will help to track projects from start to finish, allows for the creation, assignment and control of tasks and deadlines, and let project stakeholders at different levels to have an input into the process.") } , { path: path, - element: "#stormtickets", - placement: "bottom", - title: Drupal.t("An issue tracking system"), - content: Drupal.t("SuiteDesk facilitates the reporting, notifying, updating, and viewing of issues like bugs, errors and new features. If you want to notify a bug or track an issue, here you can do it. A support ticket should include vital information for the account involved and the issue encountered.") - } , { - path: path, - element: "#storminvoices", - placement: "bottom", - title: Drupal.t("Easy invoice tracking"), - content: Drupal.t("SuiteDesk give you total control of the invoicing and payment activities of projects you are involved with.") - } , { - path: path, - element: "#stormdok", - placement: "bottom", + element: "#stormdok-item a:first-child", + placement: "top", title: Drupal.t("Sharing project documents"), content: Drupal.t("It is vital to keep all participants up to date on what is going on. Document sharing and collaboration is essentially a document repository that all project stakeholders have access to.") } , { path: path, - element: "#stormfaq", - placement: "bottom", + element: "#stormticket-item a:first-child", + placement: "top", + title: Drupal.t("An issue tracking system"), + content: Drupal.t("SuiteDesk facilitates the reporting, notifying, updating, and viewing of issues like bugs, errors and new features. If you want to notify a bug or track an issue, here you can do it. A support ticket should include vital information for the account involved and the issue encountered.") + } , { + path: path, + element: "#storminvoice-item a:first-child", + placement: "top", + title: Drupal.t("Easy invoice tracking"), + content: Drupal.t("SuiteDesk give you total control of the invoicing and payment activities of projects you are involved with.") + } , { + path: path, + element: "#stormfaq-item a:first-child", + placement: "top", title: Drupal.t("Frequently Asked Questions"), content: Drupal.t("A compilation of questions and answers commonly asked by a new customer, user or project member. Before asking a question make sure that you've checked out this list.") } , { path: path, - element: "#stormwatcher", - placement: "bottom", + element: "#stormwatcher-item a:first-child", + placement: "top", title: Drupal.t("Watch content for changes"), content: Drupal.t("SuiteDesk lets users a way to easily watch tickets for changes or new comments without having to post themselves. Supports email notifications being sent when both or either of the above occurs.") } , { @@ -83,9 +90,14 @@ $jq(function() { content: Drupal.t("And this block displays the last updated contents of your projects in SuiteDesk.") } ] - }).init().start(true); + }); - if (decodeURI((RegExp('tour=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]) == 'suitedesk') { - tour.goTo(1); - } -}); \ No newline at end of file + tour.init(); + tour.start(); + + $('#menu-help a').click(function (e) { + e.preventDefault(); + tour.restart(); + }); + +}); diff --git a/themes/zuitedesk/template.php b/themes/zuitedesk/template.php index 97ce56f..cd03233 100644 --- a/themes/zuitedesk/template.php +++ b/themes/zuitedesk/template.php @@ -162,65 +162,65 @@ function zuitedesk_preprocess_page(&$vars, $hook) { $pl = ''; if ($vars['logged_in'] && !empty($deskmenu)) { // Home option: - $pl .= _zuitedesk_option(TRUE, "$lang/", t('Home'), NULL, t('Desktop')); + $pl .= _zuitedesk_option(TRUE, "$lang/", t('Home'), 'home', NULL, t('Desktop')); // CRM submenu: $submenu = ''; - $submenu .= _zuitedesk_option(!empty($_SESSION['SuiteCRM_Session_ID']), "$lang/suitecrm", 'SuiteCRM', 'crm', t('Core sales, customer service and marketing processes with SuiteCRM')); - $submenu .= _zuitedesk_option($deskmenu[7], "$lang/organizations", t('Organizations'), 'org'); + $submenu .= _zuitedesk_option(!empty($_SESSION['SuiteCRM_Session_ID']), "$lang/suitecrm", 'SuiteCRM', 'suitecrm', 'crm', t('Core sales, customer service and marketing processes with SuiteCRM')); + $submenu .= _zuitedesk_option($deskmenu[7], "$lang/organizations", t('Organizations'), 'org', 'org'); $partial = ''; - $partial .= _zuitedesk_option($deskmenu[1], "$lang/admin/user/user/local", t('User list'), 'login', t('Allows to view list users and register new users')); - $partial .= _zuitedesk_option($deskmenu[8], "$lang/people", t('People'), 'people'); - $partial .= _zuitedesk_option($deskmenu[9], "$lang/teams", t('Teams'), 'team'); + $partial .= _zuitedesk_option($deskmenu[1], "$lang/admin/user/user/local", t('User list'), 'userlist', 'login', t('Allows to view list users and register new users')); + $partial .= _zuitedesk_option($deskmenu[8], "$lang/people", t('People'), 'people', 'people'); + $partial .= _zuitedesk_option($deskmenu[9], "$lang/teams", t('Teams'), 'teams', 'team'); $submenu .= _zuitedesk_divider($submenu, $partial); $partial = ''; - $partial .= _zuitedesk_option(FALSE, "$lang/activity", t('Activity'), 'eye'); + $partial .= _zuitedesk_option(FALSE, "$lang/activity", t('Activity'), 'activity', 'eye'); $submenu .= _zuitedesk_divider($submenu, $partial); - $pl .= _zuitedesk_submenu($submenu, t('Contacts')); + $pl .= _zuitedesk_submenu($submenu, t('Contacts'), 'contacts'); // Plan submenu: $submenu = ''; - $submenu .= _zuitedesk_option($deskmenu[2], "$lang/projects", t('Projects'), 'project'); - $submenu .= _zuitedesk_option($deskmenu[3], "$lang/tasks", t('Tasks'), 'task'); - $submenu .= _zuitedesk_option($deskmenu[4], "$lang/tasks/kanban", t('Tasks Kanban'), 'kanban', t('Kanban board view for your tasks')); + $submenu .= _zuitedesk_option($deskmenu[2], "$lang/projects", t('Projects'), 'projects', 'project'); + $submenu .= _zuitedesk_option($deskmenu[3], "$lang/tasks", t('Tasks'), 'tasks', 'task'); + $submenu .= _zuitedesk_option($deskmenu[4], "$lang/tasks/kanban", t('Tasks Kanban'), 'kanban', 'kanban', t('Kanban board view for your tasks')); $partial = ''; - $partial .= _zuitedesk_option($deskmenu[5], "$lang/events", t('Events'), 'event'); - $partial .= _zuitedesk_option($deskmenu[5], "$lang/calendar", t('Calendar'), 'calendar'); + $partial .= _zuitedesk_option($deskmenu[5], "$lang/events", t('Events'), 'events', 'event'); + $partial .= _zuitedesk_option($deskmenu[5], "$lang/calendar", t('Calendar'), 'calendar', 'calendar'); $submenu .= _zuitedesk_divider($submenu, $partial); $partial = ''; - $partial .= _zuitedesk_option($deskmenu[6], "$lang/doks", t('Documentation'), 'doc'); - $partial .= _zuitedesk_option($deskmenu[6], "$lang/lexicon", t('Glossary'), 'glossary'); + $partial .= _zuitedesk_option($deskmenu[6], "$lang/doks", t('Documentation'), 'dok', 'doc'); + $partial .= _zuitedesk_option($deskmenu[6], "$lang/lexicon", t('Glossary'), 'glossary', 'glossary'); $submenu .= _zuitedesk_divider($submenu, $partial); - $pl .= _zuitedesk_submenu($submenu, t('Plan')); + $pl .= _zuitedesk_submenu($submenu, t('Plan'), 'plan'); // Assistance submenu: $submenu = ''; - $submenu .= _zuitedesk_option($deskmenu[10], "$lang/tickets", t('Tickets'), 'ticket'); + $submenu .= _zuitedesk_option($deskmenu[10], "$lang/tickets", t('Tickets'), 'tickets', 'ticket'); $partial = ''; - $partial .= _zuitedesk_option($deskmenu[11], "$lang/timetrackings", t('Timetrackings'), 'timetracking'); - $partial .= _zuitedesk_option($deskmenu[12], "$lang/expenses", t('Expenses'), 'expense'); - $partial .= _zuitedesk_option($deskmenu[13], "$lang/invoices", t('Invoices'), 'invoice'); + $partial .= _zuitedesk_option($deskmenu[11], "$lang/timetrackings", t('Timetrackings'), 'timetracking', 'timetracking'); + $partial .= _zuitedesk_option($deskmenu[12], "$lang/expenses", t('Expenses'), 'expenses', 'expense'); + $partial .= _zuitedesk_option($deskmenu[13], "$lang/invoices", t('Invoices'), 'invoices', 'invoice'); $submenu .= _zuitedesk_divider($submenu, $partial); $partial = ''; - $partial .= _zuitedesk_option($deskmenu[16], "$lang/trash", t('Trash'), 'trash'); + $partial .= _zuitedesk_option($deskmenu[16], "$lang/trash", t('Trash'), 'trash', 'trash'); $submenu .= _zuitedesk_divider($submenu, $partial); - $pl .= _zuitedesk_submenu($submenu, t('Assistance')); + $pl .= _zuitedesk_submenu($submenu, t('Assistance'), 'assistance'); // User submenu: $submenu = ''; - $submenu .= _zuitedesk_option($deskmenu[14], "$lang/notes", t('My notes'), 'note'); - $submenu .= _zuitedesk_option($deskmenu[15], "$lang/ideas", t('My ideas'), 'idea'); - $submenu .= _zuitedesk_option(TRUE, "$lang/?tour=suitedesk", 'SuiteDesk Tour', 'help', t('A beginner\'s guide to SuiteDesk')); + $submenu .= _zuitedesk_option($deskmenu[14], "$lang/notes", t('My notes'), 'notes', 'note'); + $submenu .= _zuitedesk_option($deskmenu[15], "$lang/ideas", t('My ideas'), 'ideas', 'idea'); + $submenu .= _zuitedesk_option(TRUE, '', 'SuiteDesk Tour', 'help', 'help', t('A beginner\'s guide to SuiteDesk')); $partial = ''; - $partial .= _zuitedesk_option($deskmenu[17], "$lang/user/watcher", t('Watcher'), 'apply'); + $partial .= _zuitedesk_option($deskmenu[17], "$lang/user/watcher", t('Watcher'), 'watcher', 'apply'); $submenu .= _zuitedesk_divider($submenu, $partial); $partial = ''; - $partial .= _zuitedesk_option(TRUE, "$lang/" . drupal_get_path_alias('user/' . $user->uid) . '/edit', t('My SuiteDesk profile'), 'user', t('Edit my personal account options')); - $partial .= _zuitedesk_option(TRUE, "$lang/logout", t('Logout'), 'logout', t('Close your session')); + $partial .= _zuitedesk_option(TRUE, "$lang/" . drupal_get_path_alias('user/' . $user->uid) . '/edit', t('My SuiteDesk profile'), 'profile', 'user', t('Edit my personal account options')); + $partial .= _zuitedesk_option(TRUE, "$lang/logout", t('Logout'), 'logout', 'logout', t('Close your session')); $submenu .= _zuitedesk_divider($submenu, $partial); $user_name = !empty($user->picture) ? '
' . $user->name . '
' : ''; $firstname = strpos($user->name, ' '); $user_name .= $firstname === FALSE ? $user->name : substr($user->name, 0, $firstname); - $pl .= _zuitedesk_submenu($submenu, $user_name); + $pl .= _zuitedesk_submenu($submenu, $user_name, 'user'); } else { - $pl = _zuitedesk_option(TRUE, "$lang/user/login", t('Login') . ' ', NULL, t('New session for authenticated users')); + $pl = _zuitedesk_option(TRUE, "$lang/user/login", t('Login') . ' ', 'login', NULL, t('New session for authenticated users')); } $vars['primary_links'] = '

' . t('Main menu') . '

'; @@ -242,8 +242,6 @@ function zuitedesk_preprocess_page(&$vars, $hook) { // Special class and bootstrap tour for SuiteDesk pages: $vars['classes_array'][] = 'suitedesk'; - $closure = FALSE; - // Node vars. if (!empty($vars['node'])) { $node = $vars['node']; @@ -254,32 +252,20 @@ function zuitedesk_preprocess_page(&$vars, $hook) { // Javascript to confirm projects cloning. if ($vars['node']->type == 'stormproject' && user_access('Storm project: clone projects')) { drupal_add_js('(function($) {$("li.stormproject_clone_run a").on("click", function() {return confirm("' . t('WARNING! This operation will duplicate all the project, tasks and documents in book. Are you sure?') . '");});})($jq);', 'inline', 'footer', FALSE); - $closure = TRUE; + $vars['closure'] .= drupal_get_js('footer'); } } - // For first time users login or on demand: - if ($_SESSION['deskmenu'][0] || !empty($_GET['tour'])) { - drupal_add_js(drupal_get_path('theme', 'zuitedesk') . '/js/bootstrap-tour.min.js', 'theme', 'footer'); - drupal_add_js(drupal_get_path('theme', 'zuitedesk') . '/js/tourpro.js', 'theme', 'footer'); - $closure = TRUE; - } - - if ($closure) { - $vars['closure'] = drupal_get_js('footer'); - } -/* - $vars['sample_variable'] = t('Lorem ipsum.'); - - // To remove a class from $classes_array, use array_diff(). - //$vars['classes_array'] = array_diff($vars['classes_array'], array('class-to-remove')); -*/ + // Guided tour: + $tour = 'tourmenu'; + drupal_add_js(drupal_get_path('theme', 'zuitedesk') . "/js/$tour.js", 'theme', 'footer', FALSE); } -function _zuitedesk_option($access, $url, $text, $icon = NULL, $message = NULL) { +function _zuitedesk_option($access, $url, $text, $id = NULL, $icon = NULL, $message = NULL) { $option = ''; if ($access) { - $option .= '
  • ' : '
  • '; @@ -291,8 +277,14 @@ function _zuitedesk_divider(&$submenu, &$partial) { return !empty($submenu) && !empty($partial) ? '
  • ' . $partial : $partial; } -function _zuitedesk_submenu(&$submenu, $text) { - return !empty($submenu) ? '' : ''; +function _zuitedesk_submenu(&$submenu, $text, $id = NULL) { + $options = ''; + if (!empty($submenu)) { + $options .= empty($id) ? ''; + } + return $options; } function _zuitedesk_social_link($social_field, $title, $class) { diff --git a/themes/zuitedesk/zuitedesk.info b/themes/zuitedesk/zuitedesk.info index b94e946..c792fda 100644 --- a/themes/zuitedesk/zuitedesk.info +++ b/themes/zuitedesk/zuitedesk.info @@ -1,6 +1,6 @@ name = SuiteDesk Theme description = SuiteDesk Theme Zen. -version = 0.2.43 +version = 0.2.45 screenshot = screenshot.png @@ -8,7 +8,6 @@ core = 6.x base theme = zen - ;;;;;;;;;;;;;;;;;;;;; ;; CSS ;;;;;;;;;;;;;;;;;;;;; @@ -54,17 +53,16 @@ stylesheets[all][] = modules/storm/storm-node.css stylesheets[all][] = modules/print/css/printlinks.css - ;;;;;;;;;;;;;;;;;;;;; ;; Javascript ;;;;;;;;;;;;;;;;;;;;; ; BOOTSTRAP: scripts[] = js/bootstrap.min.js +scripts[] = js/bootstrap-tour.min.js scripts[] = js/runapp.js - ;;;;;;;;;;;;;;;;;;;;; ;; Regions ;;;;;;;;;;;;;;;;;;;;; @@ -89,7 +87,6 @@ regions[footer] = Footer regions[page_closure] = Page closure - ;;;;;;;;;;;;;;;;;;;;; ;; Features ;;;;;;;;;;;;;;;;;;;;; @@ -114,7 +111,6 @@ features[] = favicon ; features[] = secondary_links - ;;;;;;;;;;;;;;;;;;;;; ;; Theme settings ;;;;;;;;;;;;;;;;;;;;;