diff --git a/js/pkp.min.js b/js/pkp.min.js index a7a79cbb342..e69de29bb2d 100644 --- a/js/pkp.min.js +++ b/js/pkp.min.js @@ -1,82 +0,0 @@ -(function(a){a.widget("ui.tagit",{options:{itemName:"item",fieldName:"tags",availableTags:[],tagSource:null,removeConfirmation:!1,caseSensitive:!0,allowSpaces:!1,animate:!0,singleField:!1,singleFieldDelimiter:",",singleFieldNode:null,tabIndex:null,onTagAdded:null,onTagRemoved:null,onTagClicked:null},_create:function(){var c=this;this.element.is("input")?(this.tagList=a("").insertAfter(this.element),this.options.singleField=!0,this.options.singleFieldNode=this.element,this.element.css("display", -"none")):this.tagList=this.element.find("ul, ol").andSelf().last();this._tagInput=a('').addClass("ui-widget-content");this.options.tabIndex&&this._tagInput.attr("tabindex",this.options.tabIndex);this.options.tagSource=this.options.tagSource||function(c,b){var d=c.term.toLowerCase(),h=a.grep(this.options.availableTags,function(a){return a.toLowerCase().indexOf(d)===0});b(this._subtractArray(h,this.assignedTags()))};a.isFunction(this.options.tagSource)&&(this.options.tagSource= -a.proxy(this.options.tagSource,this));this.tagList.addClass("tagit").addClass("ui-widget ui-widget-content ui-corner-all").append(a('
  • ').append(this._tagInput)).click(function(b){var d=a(b.target);d.hasClass("tagit-label")?c._trigger("onTagClicked",b,d.closest(".tagit-choice")):c._tagInput.focus()});this.tagList.children("li").each(function(){if(!a(this).hasClass("tagit-new")){c.createTag(a(this).html(),a(this).attr("class"),true);a(this).remove()}});if(this.options.singleField)if(this.options.singleFieldNode){var b= -a(this.options.singleFieldNode),d=b.val().split(this.options.singleFieldDelimiter);b.val("");a.each(d,function(a,b){c.createTag(b,null,false)})}else this.options.singleFieldNode=this.tagList.after('');this._tagInput.keydown(function(b){if(b.which==a.ui.keyCode.BACKSPACE&&c._tagInput.val()===""){var d=c._lastTag();!c.options.removeConfirmation||d.hasClass("remove")?c.removeTag(d):c.options.removeConfirmation&&d.addClass("remove ui-state-highlight")}else c.options.removeConfirmation&& -c._lastTag().removeClass("remove ui-state-highlight");if(b.which==a.ui.keyCode.COMMA||b.which==a.ui.keyCode.ENTER||b.which==a.ui.keyCode.TAB&&c._tagInput.val()!==""||b.which==a.ui.keyCode.SPACE&&c.options.allowSpaces!==true&&(a.trim(c._tagInput.val()).replace(/^s*/,"").charAt(0)!='"'||a.trim(c._tagInput.val()).charAt(0)=='"'&&a.trim(c._tagInput.val()).charAt(a.trim(c._tagInput.val()).length-1)=='"'&&a.trim(c._tagInput.val()).length-1!==0)){b.preventDefault();c.createTag(c._cleanedInput(),null,false); -c._tagInput.autocomplete("close")}}).blur(function(){c.createTag(c._cleanedInput(),null,false)});this._autocompleteVal=null;this._selectAction=function(){if(c._tagInput.val()==c._autocompleteVal){c.createTag(c._autocompleteVal,null,true);c.tagList.children(".tagit-new").children("input").val("");return false}};(this.options.availableTags||this.options.tagSource)&&this._tagInput.autocomplete({source:this.options.tagSource,close:this._selectAction,select:this._selectAction,minLength:2,autoFocus:!0, -focus:function(b,d){c._autocompleteVal=d.item.value;a(this).val(c._unescapeHTML(d.item.value));return false}})},_cleanedInput:function(){return a.trim(this._tagInput.val().replace(/^"(.*)"$/,"$1"))},_lastTag:function(){return this.tagList.children(".tagit-choice:last")},assignedTags:function(){var c=this,b=[];this.options.singleField?(b=a(this.options.singleFieldNode).val().split(this.options.singleFieldDelimiter),""===b[0]&&(b=[])):this.tagList.children(".tagit-choice").each(function(){b.push(c.tagLabel(this))}); -return b},_updateSingleTagsField:function(c){a(this.options.singleFieldNode).val(c.join(this.options.singleFieldDelimiter))},_subtractArray:function(c,b){for(var d=[],e=0;e").html(c).text()},createTag:function(c,b,d){d&&(c=this._unescapeHTML(c));var e=this,c=a.trim(c);if(!this._isNew(c)||""===c)return!1;var d=a(this.options.onTagClicked?'':'').text(c),f=a("
  • ").addClass("tagit-choice ui-widget-content ui-state-default ui-corner-all").addClass(b).append(d),b=a("").addClass("ui-icon ui-icon-close"), -b=a('\u00d7').addClass("tagit-close").append(b).click(function(){e.removeTag(f)});f.append(b);this.options.singleField?(b=this.assignedTags(),b.push(c),this._updateSingleTagsField(b)):(c=urlEncode(c),f.append(''));this._trigger("onTagAdded",null,f);this._tagInput.val("");this._tagInput.parent().before(f)},removeTag:function(c,b){b=b||this.options.animate; -c=a(c);this._trigger("onTagRemoved",null,c);if(this.options.singleField){var d=this.assignedTags(),e=this.tagLabel(c),d=a.grep(d,function(a){return a!=e});this._updateSingleTagsField(d)}b?c.fadeOut("fast").hide("blind",{direction:"horizontal"},"fast",function(){c.remove()}).dequeue():c.remove()},removeAll:function(){var a=this;this.tagList.children(".tagit-choice").each(function(b,d){a.removeTag(d,!1)})}})})(jQuery);jQuery.cookie=function(a,c,b){if("undefined"!=typeof c){b=b||{};null===c&&(c="",b.expires=-1);var d="";if(b.expires&&("number"==typeof b.expires||b.expires.toUTCString))"number"==typeof b.expires?(d=new Date,d.setTime(d.getTime()+864E5*b.expires)):d=b.expires,d="; expires="+d.toUTCString();var e=b.path?"; path="+b.path:"",f=b.domain?"; domain="+b.domain:"",b=b.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(c),d,e,f,b].join("")}else{c=null;if(document.cookie&&""!=document.cookie){b= -document.cookie.split(";");for(d=0;dMake font size smaller Make font size default Make font size larger "); -if(void 0!=$.cookie){var h=$.cookie("font-size");null!=h&&$(c).css("font-size",parseInt(h,10))}$(a+" .pkp_controllers_fontController_smallFont").click(function(){var d=parseInt($(c).css("font-size"),10)-1;d>=b&&$(c).css("font-size",d);d<=b&&$(a+" .pkp_controllers_fontController_smallFont").addClass("pkp_controllers_fontController_sdisabled");db&&$(a+" .pkp_controllers_fontController_smallFont").removeClass("pkp_controllers_fontController_sdisabled");d>=e&&$(a+" .pkp_controllers_fontController_largeFont").addClass("pkp_controllers_fontController_ldisabled"); -g(d,f)})};function confirmAction(a,c){return confirm(c)?(a&&(document.location.href=a),!0):!1}function openHelp(a){window.open(a,"Help","width=700,height=600,screenX=100,screenY=100,toolbar=0,scrollbars=1")}function openComments(a){window.open(a,"Comments","width=700,height=600,screenX=100,screenY=100,toolbar=0,resizable=1,scrollbars=1")}function openWindow(a){window.open(a,"Window","width=600,height=550,screenX=100,screenY=100,toolbar=0,resizable=1,scrollbars=1")} -function openRTWindow(a){window.open(a,"RT","width=700,height=500,screenX=100,screenY=100,toolbar=0,resizable=1,scrollbars=1")}function openRTWindowWithToolbar(a){window.open(a,"RT","width=700,height=500,screenX=100,screenY=100,toolbar=1,resizable=1,scrollbars=1")}function getBrowserObject(a,c){var b=0,d;document.getElementById?d=document.getElementById(a):document.all?d=document.all[a]:document.layers&&(d=document.layers[a],b=1);c&&!b&&(d=d.style);return d} -function loadUrl(a){document.location.href=a}function createCookie(a,c,b){if(b){var d=new Date;d.setTime(d.getTime()+864E5*b);b="; expires="+d.toGMTString()}else b="";document.cookie=a+"="+c+b+"; path=/"}function readCookie(a){for(var a=a+"=",c=document.cookie.split(";"),b=0;b").text(a).html()}function unescapeHTML(a){return $("
    ").html(a).text()};function jqueryValidatorI18n(a,c){var b;b=a+"/lib/pkp/js/lib/jquery/plugins/validate/localization/messages_";switch(c){case "fr_FR":case "ca_FR":eval($.getScript(b+"fr.js"));break;case "pt_BR":eval($.getScript(b+"ptbr.js"));break;case "pt_PT":eval($.getScript(b+"ptpt.js"));break;case "es_AR":case "es_ES":eval($.getScript(b+"es.js"))}};(function(a){a.pkp=a.pkp||{};a.pkp.classes=a.pkp.classes||{};a.pkp.controllers=a.pkp.controllers||{};a.pkp.controllers.form=a.pkp.controllers.form||{};a.pkp.plugins=a.pkp.plugins||{};a.pkp.plugins.blocks=a.pkp.plugins.blocks||{};a.pkp.plugins.generic=a.pkp.plugins.generic||{};a.pkp.classes.Helper=function(){throw Error("Trying to instantiate the Helper singleton!");};a.pkp.classes.Helper.CHARS_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");a.pkp.classes.Helper.uuid=function(){var c= -a.pkp.classes.Helper.CHARS_,b=Array(36),d=0,e,f;for(f=0;36>f;f++)8==f||13==f||18==f||23==f?b[f]="-":14==f?b[f]="4":(2>=d&&(d=33554432+16777216*Math.random()|0),e=d&15,d>>=4,b[f]=c[19==f?e&3|8:e]);return b.join("")};a.pkp.classes.Helper.inherits=function(a,b){var d=function(){};d.prototype=b.prototype;a.parent_=b.prototype;a.prototype=new d;a.prototype.constructor=a;b.prototype.constructor==Object.prototype.constructor&&(b.prototype.constructor=b)};a.pkp.classes.Helper.objectFactory=function(c,b){var d, -e;d=a.pkp.classes.Helper.resolveObjectName(c);e=a.pkp.classes.Helper.getObjectProxyInstance();a.extend(!0,e,a.pkp.classes.ObjectProxy);a.pkp.classes.Helper.inherits(e,d);a.extend(!0,e.prototype,a.pkp.classes.ObjectProxy.prototype);return new e(c,b)};a.pkp.classes.Helper.resolveObjectName=function(c){var b,d,e;b=c.split(".");if("$"!=b.shift())throw Error(['Namespace "',b[0],'" for object"',c,'" is currently not supported!'].join(""));e=b[b.length-1];if(e.charAt(0).toUpperCase()!==e.charAt(0))throw Error(['The name "', -c,'" does not point to aconstructor which must always be upper case!'].join(""));e=a;for(d in b)if(e=e[b[d]],void 0===e)throw Error(['Constructor for object "',c,'" not found!'].join(""));if(!a.isFunction(e))throw Error(['The name "',c,'" does not point to a,constructor which must always be a function!'].join());return e};a.pkp.classes.Helper.getObjectProxyInstance=function(){var a=function(a,c){this.objectName_=a;this.parent.apply(this,c)};a.objectName_="";a.prototype.parent=function(){};return a}; -a.pkp.classes.Helper.injectMixin=function(c,b){var d=a.pkp.classes.Helper.objectFactory(b,[]);a.extend(!0,c,d)};a.pkp.classes.Helper.curry=function(a,b,d){if(2=parseInt(a.browser.version.substring(0,1),10)?setTimeout(function(){this.scrollToMakeVisible_(b,d)},500):this.scrollToMakeVisible_(b, -d))};a.pkp.controllers.ExtrasOnDemandHandler.prototype.deactivateExtraContent_=function(c){var b=this.getHtmlElement();a(".extrasContainer",b).hide(c);a(".toggleExtras .toggleExtras-active",b).hide();a(".toggleExtras .toggleExtras-inactive",b).show();a(".toggleExtras",b).removeClass("active").addClass("inactive");a(".ui-icon",b).removeClass("ui-icon-triangle-1-s").addClass("ui-icon-triangle-1-e")};a.pkp.controllers.ExtrasOnDemandHandler.prototype.scrollToMakeVisible_=function(a,b){var d,e,f;d=a.position().top; -e=b.position().top;f=parseInt(b.scrollTop(),10);d>e?(d=Math.ceil(d+a.height()-b.height()),0
    "); -return this}})(jQuery); diff --git a/templates/common/minifiedScripts.tpl b/templates/common/minifiedScripts.tpl index eeae7a896e5..a86d9d70295 100644 --- a/templates/common/minifiedScripts.tpl +++ b/templates/common/minifiedScripts.tpl @@ -35,12 +35,14 @@ {* Generic controllers *} + +