PageSourceSearch

http://www.mic.gr/sites/default/files/js/js_ZpA1I7AAKZwr6hXjXJlkeCyj22o_gA99bGkh4A3YvWk.js

js mic.gr collected 2026-10-02 08:19:48 UTC 77,731 bytes, 1,608 lines download raw bytes

1Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"":{"An AJAX HTTP error occurred.":"\u03a0\u03b1\u03c1\u03bf\u03c5\u03c3\u03b9\u03ac\u03c3\u03c4\u03b7\u03ba\u03b5 AJAX HTTP \u03c3\u03c6\u03ac\u03bb\u03bc\u03b1.","HTTP Result Code: !status":"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03b1\u03c0\u03bf\u03c4\u03b5\u03bb\u03ad\u03c3\u03bc\u03b1\u03c4\u03bf\u03c2 HTTP: !status","An AJAX HTTP request terminated abnormally.":"\u039c\u03b9\u03b1 AJAX HTTP \u03b1\u03af\u03c4\u03b7\u03c3\u03b7 \u03b4\u03b5\u03bd \u03c0\u03b5\u03c1\u03b1\u03c4\u03ce\u03b8\u03b7\u03ba\u03b5 \u03c6\u03c5\u03c3\u03b9\u03bf\u03bb\u03bf\u03b3\u03b9\u03ba\u03ac.","Debugging information follows.":"\u0391\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03bf\u03cd\u03bd \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 \u03b1\u03c0\u03bf\u03c3\u03c6\u03b1\u03bb\u03bc\u03ac\u03c4\u03c9\u03c3\u03b7\u03c2.","Path: !uri":"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae: !uri","StatusText: !statusText":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u039a\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7\u03c2: !statusText","ResponseText: !responseText":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u0391\u03c0\u03cc\u03ba\u03c1\u03b9\u03c3\u03b7\u03c2: !responseText","ReadyState: !readyState":"\u039a\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 \u0388\u03c4\u03bf\u03b9\u03bc\u03bf: !readyState","CustomMessage: !customMessage":"\u03a0\u03c1\u03bf\u03c3\u03b1\u03c1\u03bc\u03bf\u03c3\u03bc\u03ad\u03bd\u03bf \u03bc\u03ae\u03bd\u03c5\u03bc\u03b1: !customMessage","@title dialog":"\u03a0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf \u03b4\u03b9\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5 @title","Submit":"\u03a5\u03c0\u03bf\u03b2\u03bf\u03bb\u03ae","Configure":"\u0394\u03b9\u03b5\u03c5\u03b8\u03ad\u03c4\u03b7\u03c3\u03b7","Show shortcuts":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03c4\u03c9\u03bd \u03c3\u03c5\u03bd\u03c4\u03bf\u03bc\u03b5\u03cd\u03c3\u03b5\u03c9\u03bd","Hide shortcuts":"\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7 \u03c4\u03c9\u03bd \u03c3\u03c5\u03bd\u03c4\u03bf\u03bc\u03b5\u03cd\u03c3\u03b5\u03c9\u03bd","Loading":"\u03a6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7","(active tab)":"(\u03b5\u03bd\u03b5\u03c1\u03b3\u03ae \u03ba\u03b1\u03c1\u03c4\u03ad\u03bb\u03b1)","All":"\u038c\u03bb\u03b5\u03c2","New":"\u0394\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03af\u03b1","Recent":"\u03a0\u03c1\u03cc\u03c3\u03c6\u03b1\u03c4\u03bf","Hide":"\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7","Show":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7","Loading token browser...":"\u03a6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7 \u03c4\u03bf\u03c5 \u03c0\u03bb\u03bf\u03b7\u03b3\u03bf\u03cd \u03c3\u03c5\u03bc\u03b2\u03cc\u03bb\u03c9\u03bd \u03b1\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7\u03c2...","Available tokens":"\u0394\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03b1 \u03c3\u03cd\u03bc\u03b2\u03bf\u03bb\u03b1 \u03b1\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7\u03c2","Insert this token into your form":"\u0395\u03b9\u03c3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03c3\u03cd\u03bc\u03b2\u03bf\u03bb\u03bf (token) \u03b1\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7\u03c2 \u03c3\u03c4\u03b7\u03bd \u03c6\u03cc\u03c1\u03bc\u03b1 \u03c3\u03b1\u03c2","First click a text field to insert your tokens into.":"\u039a\u03ac\u03bd\u03c4\u03b5 \u03c0\u03c1\u03ce\u03c4\u03b1 \u03ba\u03bb\u03b9\u03ba \u03c3\u03b5 \u03ad\u03bd\u03b1 \u03c0\u03b5\u03b4\u03af\u03bf \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03b5\u03b9\u03c3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03c4\u03b1 \u03c3\u03cd\u03bc\u03b2\u03bf\u03bb\u03b1 (tokens) \u03b1\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7\u03c2 \u03c3\u03b5 \u03b1\u03c5\u03c4\u03cc.","Please wait...":"\u03a0\u03b1\u03c1\u03b1\u03ba\u03b1\u03bb\u03ce \u03c0\u03b5\u03c1\u03b9\u03bc\u03ad\u03bd\u03b5\u03c4\u03b5...","The response failed verification so will not be processed.":"\u0397 \u03b1\u03c0\u03cc\u03ba\u03c1\u03b9\u03c3\u03b7 \u03b1\u03c0\u03ad\u03c4\u03c5\u03c7\u03b5 \u03c4\u03b7\u03bd \u03b5\u03c0\u03b9\u03b2\u03b5\u03b2\u03b1\u03af\u03c9\u03c3\u03b7 \u03ba\u03b1\u03b9 \u03b4\u03b5\u03bd \u03b8\u03b1 \u03b3\u03af\u03bd\u03b5\u03b9 \u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c4\u03b7\u03c2.","The callback URL is not local and n
1ot trusted: !url":"\u0397 \u03b4\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 URL \u03b5\u03c0\u03b1\u03bd\u03ac\u03ba\u03bb\u03b7\u03c3\u03b7\u03c2 \u03b5\u03af\u03bd\u03b1\u03b9 \u03bc\u03b7 \u03c4\u03bf\u03c0\u03b9\u03ba\u03ae \u03ba\u03b1\u03b9 \u03bc\u03b7 \u03ad\u03bc\u03c0\u03b9\u03c3\u03c4\u03b7: !url","Re-order rows by numerical weight instead of dragging.":"\u0395\u03c0\u03b1\u03bd\u03b1\u03c4\u03b1\u03be\u03b9\u03bd\u03cc\u03bc\u03b7\u03c3\u03b7 \u03c4\u03c9\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03bc\u03b5 \u03c4\u03b9\u03c2 \u03b1\u03c1\u03b9\u03b8\u03bc\u03b7\u03c4\u03b9\u03ba\u03ad\u03c2 \u03b2\u03b1\u03c1\u03cd\u03c4\u03b7\u03c4\u03b5\u03c2 \u03b1\u03bd\u03c4\u03af \u03b3\u03b9\u03b1 \u03c3\u03cd\u03c1\u03c3\u03b9\u03bc\u03bf.","Show row weights":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03c4\u03c9\u03bd \u03b2\u03b1\u03c1\u03c5\u03c4\u03ae\u03c4\u03c9\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd","Hide row weights":"\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7 \u03c4\u03c9\u03bd \u03b2\u03b1\u03c1\u03c5\u03c4\u03ae\u03c4\u03c9\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd","Drag to re-order":"\u039c\u03b5\u03c4\u03b1\u03ba\u03b9\u03bd\u03ae\u03c3\u03c4\u03b5 \u03b3\u03b9\u03b1 \u03b1\u03bd\u03b1\u03ba\u03b1\u03c4\u03ac\u03c4\u03b1\u03be\u03b7","Changes made in this table will not be saved until the form is submitted.":"\u039f\u03b9 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ad\u03c2 \u03c0\u03bf\u03c5 \u03b3\u03af\u03bd\u03bf\u03bd\u03c4\u03b1\u03b9 \u03c3\u0027 \u03b1\u03c5\u03c4\u03cc\u03bd \u03c4\u03bf\u03bd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1 \u03b4\u03b5\u03bd \u03b8\u03b1 \u03b1\u03c0\u03bf\u03b8\u03b7\u03ba\u03b5\u03c5\u03c4\u03bf\u03cd\u03bd \u03ad\u03c9\u03c2 \u03cc\u03c4\u03bf\u03c5 \u03b7 \u03c6\u03cc\u03c1\u03bc\u03b1 \u03c5\u03c0\u03bf\u03b2\u03bb\u03b7\u03b8\u03b5\u03af.","Add":"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7","Remove group":"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae \u03bf\u03bc\u03ac\u03b4\u03b1\u03c2","Apply (all displays)":"\u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae (\u03cc\u03bb\u03b5\u03c2 \u03bf\u03b9 \u03c0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ad\u03c2)","Revert to default":"\u0395\u03c0\u03b1\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac \u03c3\u03c4\u03bf \u03c0\u03c1\u03bf\u03ba\u03b1\u03b8\u03bf\u03c1\u03b9\u03c3\u03bc\u03ad\u03bd\u03bf","Apply (this display)":"\u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae (\u03b1\u03c5\u03c4\u03ae \u03b7 \u03c0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae)","Not restricted":"\u03a7\u03c9\u03c1\u03af\u03c2 \u03c0\u03b5\u03c1\u03b9\u03bf\u03c1\u03b9\u03c3\u03bc\u03cc","Restricted to certain pages":"\u03a0\u03b5\u03c1\u03b9\u03bf\u03c1\u03af\u03b6\u03b5\u03c4\u03b1\u03b9 \u03c3\u03b5 \u03bf\u03c1\u03b9\u03c3\u03bc\u03ad\u03bd\u03b5\u03c2 \u03c3\u03b5\u03bb\u03af\u03b4\u03b5\u03c2","Not customizable":"\u038c\u03c7\u03b9 \u03c0\u03c1\u03bf\u03c3\u03b1\u03c1\u03bc\u03cc\u03c3\u03b9\u03bc\u03bf","The changes to these blocks will not be saved until the \u003Cem\u003ESave blocks\u003C\/em\u003E button is clicked.":"\u039f\u03b9 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ad\u03c2 \u03c3\u03b5 \u03b1\u03c5\u03c4\u03ac \u03c4\u03b1 \u03bc\u03c0\u03bb\u03bf\u03ba \u03b4\u03b5\u03bd \u03b8\u03b1 \u03b1\u03c0\u03bf\u03b8\u03b7\u03ba\u03b5\u03c5\u03c4\u03bf\u03cd\u03bd \u03ad\u03c9\u03c2 \u03cc\u03c4\u03bf\u03c5 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03ba\u03bb\u03b9\u03ba \u03c3\u03c4\u03bf \u03ba\u03bf\u03c5\u03bc\u03c0\u03af \u003Cem\u003E\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03bc\u03c0\u03bb\u03bf\u03ba\u003C\/em\u003E.","The block cannot be placed in this region.":"\u03a4\u03bf \u03bc\u03c0\u03bb\u03bf\u03ba \u03b4\u03b5\u03bd \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c4\u03b7\u03b8\u03b5\u03af \u03c3\u03b5 \u03b1\u03c5\u03c4\u03ae \u03c4\u03b7\u03bd \u03c0\u03b5\u03c1\u03b9\u03bf\u03c7\u03ae.","Not in menu":"\u038c\u03c7\u03b9 \u03c3\u03b5 \u03bc\u03b5\u03bd\u03bf\u03cd","New revision":"\u039d\u03ad\u03b1 \u03b1\u03bd\u03b1\u03b8\u03b5\u03ce\u03c1\u03b7\u03c3\u03b7","No revision":"\u03a7\u03c9\u03c1\u03af\u03c2 \u03b1\u03bd\u03b1\u03b8\u03b5\u03ce\u03c1\u03b7\u03c3\u03b7","By @name on @date":"\u
10391\u03c0\u03cc @name \u03c3\u03c4\u03b9\u03c2 @date","By @name":"\u0391\u03c0\u03cc @name","Not published":"\u039c\u03b7 \u03b4\u03b7\u03bc\u03bf\u03c3\u03b9\u03b5\u03c5\u03bc\u03ad\u03bd\u03bf","Automatic alias":"\u0391\u03c5\u03c4\u03cc\u03bc\u03b1\u03c4\u03bf \u03c8\u03b5\u03c5\u03b4\u03ce\u03bd\u03c5\u03bc\u03bf","Alias: @alias":"\u03a8\u03b5\u03c5\u03b4\u03ce\u03bd\u03c5\u03bc\u03bf: @alias","No alias":"\u03a7\u03c9\u03c1\u03af\u03c2 \u03c8\u03b5\u03c5\u03b4\u03ce\u03bd\u03c5\u03bc\u03bf","@number comments per page":"@number \u03c3\u03c7\u03cc\u03bb\u03b9\u03b1 \u03b1\u03bd\u03ac \u03c3\u03b5\u03bb\u03af\u03b4\u03b1","Autocomplete popup":"\u0391\u03bd\u03b1\u03b4\u03c5\u03cc\u03bc\u03b5\u03bd\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf \u03b1\u03c5\u03c4\u03cc\u03bc\u03b1\u03c4\u03b7\u03c2 \u03c3\u03c5\u03bc\u03c0\u03bb\u03ae\u03c1\u03c9\u03c3\u03b7\u03c2","Searching for matches...":"\u0393\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03b1\u03bd\u03b1\u03b6\u03ae\u03c4\u03b7\u03c3\u03b7...","Select all rows in this table":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03c3\u03b5 \u03b1\u03c5\u03c4\u03cc\u03bd \u03c4\u03bf\u03bd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","Deselect all rows in this table":"\u0391\u03c0\u03bf\u03b5\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03c3\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf\u03bd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","Content can only be inserted into CKEditor in the WYSIWYG mode.":"\u03a0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03b5\u03af \u03bc\u03cc\u03bd\u03bf \u03c3\u03c4\u03bf CKEditor \u03c3\u03b5 \u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 WYSIWYG.","This field is required.":"\u03a4\u03bf \u03c0\u03b5\u03b4\u03af\u03bf \u03b5\u03af\u03bd\u03b1\u03b9 \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03bf.","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"\u03a4\u03bf \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf %filename \u03b4\u03b5\u03bd \u03bc\u03c0\u03cc\u03c1\u03b5\u03c3\u03b5 \u03bd\u03b1 \u03b1\u03c0\u03b5\u03c3\u03c4\u03b1\u03bb\u03bb\u03b5\u03af. \u039c\u03cc\u03bd\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03b1 \u03b1\u03c0\u03cc \u03c4\u03bf\u03c5\u03c2 \u03c0\u03b1\u03c1\u03b1\u03ba\u03ac\u03c4\u03c9 \u03c4\u03cd\u03c0\u03bf\u03c5\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd \u03b5\u03c0\u03b9\u03c4\u03c1\u03ad\u03c0\u03bf\u03bd\u03c4\u03b1\u03b9: %extensions.","Edit":"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1","Hide summary":"\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7 \u03c0\u03b5\u03c1\u03af\u03bb\u03b7\u03c8\u03b7\u03c2","Edit summary":"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c0\u03b5\u03c1\u03af\u03bb\u03b7\u03c8\u03b7\u03c2","Done":"\u0388\u03b3\u03b9\u03bd\u03b5","Prev":"\u03a0\u03c1\u03bf\u03b7\u03b3","Next":"\u0395\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf","Today":"\u03a3\u03ae\u03bc\u03b5\u03c1\u03b1","January":"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2","February":"\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2","March":"\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2","April":"\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2","May":"\u039c\u03ac\u03b9\u03bf\u03c2","June":"\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2","July":"\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2","August":"\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2","September":"\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2","October":"\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2","November":"\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2","December":"\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2","Jan":"\u0399\u03b1\u03bd","Feb":"\u03a6\u03b5\u03b2","Apr":"\u0391\u03c0\u03c1","Jun":"\u0399\u03bf\u03c5\u03bd","Jul":"\u0399\u03bf\u03c5\u03bb","Aug":"\u0391\u03c5\u03b3","Sep":"\u03a3\u03b5\u03c0","Oct":"\u039f\u03ba\u03c4","Nov":"\u039d\u03bf\u03b5","Dec":"\u0394\u03b5\u03ba","Sunday":"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae","Monday":"\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1","Tuesday":"\u03a4\u03c1\u03af\u03c4\u03b7","Wednesday":"\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7","Thursday":"\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7","Frid
1ay":"\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae","Saturday":"\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf","Sun":"\u039a\u03c5\u03c1","Mon":"\u0394\u03b5\u03c5","Tue":"\u03a4\u03c1\u03af","Wed":"\u03a4\u03b5\u03c4","Thu":"\u03a0\u03ad\u03bc","Fri":"\u03a0\u03b1\u03c1","Sat":"\u03a3\u03ac\u03b2","Su":"\u039a\u03c5","Mo":"\u0394\u03b5","Tu":"\u03a4\u03c1","We":"\u03a4\u03b5","Th":"\u03a0\u03b5","Fr":"\u03a0\u03b1","Sa":"\u03a3\u03b1","mm\/dd\/yy":"\u039c\u039c\/\u0397\u0397\/\u0395\u0395","Requires a title":"\u0391\u03c0\u03b1\u03b9\u03c4\u03b5\u03af\u03c4\u03b1\u03b9 \u03ad\u03bd\u03b1\u03c2 \u03c4\u03af\u03c4\u03bb\u03bf\u03c2","Don\u0027t display post information":"\u039d\u03b1 \u03bc\u03b7\u03bd \u03b5\u03bc\u03c6\u03b1\u03bd\u03af\u03b6\u03bf\u03bd\u03c4\u03b1\u03b9 \u03bf\u03b9 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 \u03ba\u03b1\u03c4\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7\u03c2","Other":"\u0386\u03bb\u03bb\u03bf","Cancel":"\u0386\u03ba\u03c5\u03c1\u03bf","Disabled":"\u0391\u03c0\u03b5\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03b9\u03b7\u03bc\u03ad\u03bd\u03bf","Enabled":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03b9\u03b7\u03bc\u03ad\u03bd\u03bf","Status":"\u039a\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7","Size":"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2","Filename":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5","Upload":"\u0391\u03c0\u03bf\u03c3\u03c4\u03bf\u03bb\u03ae","N\/A":"\u039c\/\u0394","Allowed HTML tags":"\u0395\u03c0\u03b9\u03c4\u03c1\u03b5\u03c0\u03c4\u03ad\u03c2 \u03b5\u03c4\u03b9\u03ba\u03ad\u03c4\u03b5\u03c2 HTML","0 sec":"0 \u03b4\u03b5\u03c5\u03c4","Starting upload...":"\u0388\u03bd\u03b1\u03c1\u03be\u03b7 \u03b1\u03c0\u03bf\u03c3\u03c4\u03bf\u03bb\u03ae\u03c2...","@size KB":"@size KB","@size MB":"@size MB","@size GB":"@size GB","This permission is inherited from the authenticated user role.":"\u0391\u03c5\u03c4\u03ae \u03b7 \u03ac\u03b4\u03b5\u03b9\u03b1 \u03ba\u03bb\u03b7\u03c1\u03bf\u03bd\u03bf\u03bc\u03ae\u03b8\u03b7\u03ba\u03b5 \u03b1\u03c0\u03cc \u03c4\u03bf\u03bd \u03c1\u03cc\u03bb\u03bf \u03c0\u03b9\u03c3\u03c4\u03bf\u03c0\u03bf\u03b9\u03b7\u03bc\u03ad\u03bd\u03bf\u03c2 \u03c7\u03c1\u03ae\u03c3\u03c4\u03b7\u03c2.","Customize dashboard":"\u03a0\u03c1\u03bf\u03c3\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1 \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03c9\u03bd","Add a new file":"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03bd\u03ad\u03bf\u03c5 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5","Show description":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03c0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2","Close":"\u039a\u03bb\u03b5\u03af\u03c3\u03b9\u03bc\u03bf","1 sec":"1 \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03bf","@count sec":"@count \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1","@count min":"@count \u03bb\u03b5\u03c0\u03c4\u03ac","1 min":"1 \u03bb\u03b5\u03c0\u03c4\u03cc","@count hours":"@count \u03ce\u03c1\u03b5\u03c2","1 day":"1\u03b7\u03bc\u03ad\u03c1\u03b1","@count days":"@count \u03b7\u03bc\u03ad\u03c1\u03b5\u03c2","1 hour":"1 \u03ce\u03c1\u03b1","@count bytes":"@count bytes","The selected text format will not allow it to display images. The text format will need to be changed for this image to display properly when saved.":"\u039f \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c2 \u03bc\u03bf\u03c1\u03c6\u03cc\u03c4\u03c5\u03c0\u03bf\u03c2 \u03b5\u03b9\u03c3\u03cc\u03b4\u03bf\u03c5 \u03b4\u03b5\u03bd \u03b5\u03c0\u03b9\u03c4\u03c1\u03ad\u03c0\u03b5\u03b9 \u03c4\u03b7\u03bd \u03b5\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03b5\u03b9\u03ba\u03cc\u03bd\u03c9\u03bd. \u039f \u03bc\u03bf\u03c1\u03c6\u03cc\u03c4\u03c5\u03c0\u03bf\u03c2 \u03b5\u03b9\u03c3\u03cc\u03b4\u03bf\u03c5 \u03b8\u03b1 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03b1\u03bb\u03bb\u03b1\u03c7\u03b8\u03b5\u03af \u03c0\u03c1\u03bf\u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03bd\u03b1 \u03b5\u03bc\u03c6\u03b1\u03bd\u03b9\u03c3\u03c4\u03b5\u03af \u03ba\u03b1\u03c4\u03ac\u03bb\u03bb\u03b7\u03bb\u03b1 \u03b7 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1 \u03bc\u03b5\u03c4\u03ac \u03c4\u03b7\u03bd \u03b1\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7.","Browse":"\u0395\u03be\u03b5\u03c1\u03b5\u03cd\u03bd\u03b7\u03c3\u03b7","1 byte":"1 byte","Colorbox":"Colorbox"}} };;
2/**
3 * @file
4 *
5 * Pagerer jquery scripts.
6 *
7 * All jQuery navigation widgets implemented by pagerer are configured at
8 * runtime by a JSON object prepared by the PHP part of the module, and
9 * stored in a 'pagererState' object attached to each widget.
10 *
11 * pagererState properties:
12 * - path: drupal *request* path inclusive of querystring fragment, no base
13 *   path
14 * - element: integer to distinguish between multiple pagers on one page
15 * - quantity: number of page elements in the pager list
16 * - total: total number of pages in the query
17 * - totalItems: total number of items in the query
18 * - current: 0-base index of current page
19 * - interval: number of elements per page (1 if display = pages, items per
20 *   page if display = items/item_ranges)
21 * - display: pages|items|item_ranges indicates what is displayed in the page
22 *   element
23 * - pagerSeparator: Text to fill between contiguous pages.
24 * - rangeSeparator: Text to place between first and last item in a range.
25 * - pageTag: Text to use to render the target page/item/item range.
26 * - widgetResize: (widget) determines if the widget width should be calculated
27 *   dynamically based on the width of the string of the last page/item number.
28 * - action: (slider) determines how the page relocation should be triggered
29 *   after it has been selected through the jQuery slider.
30 * - timelapse: (slider) the grace time (in milliseconds) to wait before the
31 *   page is relocated, in case "timelapse" action method is selected for
32 *   the jQuery slider.
33 * - icons: (slider) determines whether to display +/- navigation icons
34 *   on the sides of the jQuery slider.
35 * - tickmarkTitle: (slider) help text appended to the slider help when user is
36 *   expected to click on the tickmark to start page relocation.
37 * - pageTitle: (scrollpane) Help text used when hovering a page link.
38 * - firstTitle: (scrollpane) Help text used when hovering a first page link.
39 * - lastTitle: (scrollpane) Help text used when hovering a last page link.
40 */
41
42(function ($) {
43Drupal.behaviors.pagerer = {
44  attach: function(context, settings) {
45
46    /**
47     * Constants.
48     */
49    var PAGERER_LEFT = -1;
50    var PAGERER_RIGHT = 1;
51
52    /**
53     * State variables.
54     *
55     * These variables are reset at every page load, either normal or AJAX.
56     */
57    var state = {
58      timeoutAction: 0,
59      intervalAction: 0,
60      intervalCount: 0,
61      isRelocating: false
62    };
63
64     /**
65     * 'pagerer-page' input box event binding
66     */
67    $('.pagerer-page', context)
68    .ready().each(function(index) {
69      state.isRelocating = false;
70      this.pagererState = pagererEvalState($(this).attr('name'));
71      // Item ranges do not really work on widget.
72      if (this.pagererState.display === 'item_ranges') {
73        this.pagererState.display = 'items';
74      }
75      // Adjust width of the input box.
76      if (this.pagererState.widgetResize) {
77        $(this).width(String(indexToValue(this.pagererState.total - 1, this.pagererState)).length + 'em');
78      }
79    })
80    .bind('focus', function(event) {
81      pagererReset();
82      this.select();
83      $(this).addClass('pagerer-page-has-focus');
84    })
85    .bind('blur', function(event) {
86      $(this).removeClass('pagerer-page-has-focus');
87    })
88    .bind('keydown', function(event) {
89      switch(event.keyCode) {
90        case 13:
91        case 10:
92          // Return key pressed, relocate.
93          var targetPage = valueToIndex($(this).val(), this.pagererState);
94          if (targetPage !== this.pagererState.current) {
95            pagererRelocate(this, this, targetPage);
96          }
97          event.stopPropagation();
98          event.preventDefault();
99          return false;
100
101        case 27:
102          // Escape.
103          $(this).val(indexToValue(this.pagererState.current, this.pagererState));
104          return false;
105
106        case 38:
107          // Up.
108          widgetOffsetValue(this, -1);
109          return false;
110
111        case 40:
112          // Down.
113          widgetOffsetValue(this, 1);
114          return false;
115
116        case 33:
117          // Page up.
118          widgetOffsetValue(this, -5);
119          return false;
120
121        case 34:
122          // Page down.
123          widgetOffsetValue(this, 5);
124          return false;
125
126        case 35:
127          // End.
128           $(this).val(indexToValue(this.pagererState.total - 1, this.pagererState));
129          return false;
130
131        case 36:
132          // Home.
133           $(this).val(1);
134          return false;
135
136      }
137    });
138
139    /**
140     * 'pagerer-slider' jQuery UI slider event binding.
141     */
142    $('.pagerer-slider', context)
143    .ready().each(function(index) {
144      state.isRelocating = false;
145      this.pagererState = pagererEvalState($(this).attr('id'));
146
147      // Create slider.
148      var sliderBar = $(this);
149      sliderBar.slider({
150        min: 0,
151        max: this.pagererState.total - 1,
152        step: 1,
153        value: this.pagererState.current,
154        range: 'min',
155        animate: true
156      });
157
158      // Set slider handle dimensions and text.
159      var sliderHandle = sliderBar.find('.ui-slider-handle');
160      sliderHandle
161        .css('width', (String(indexToValue(this.pagererState.total - 1, this.pagererState)).length + 2) + 'em')
162        .css('height', Math.max(sliderHandle.height(), 16) + 'px')
163        .css('line-height', Math.max(sliderHandle.height(), 16) + 'px')
164        .css('margin-left', -sliderHandle.width() / 2)
165        .text(indexToValue(this.pagererState.current, this.pagererState))
166        .bind('blur', function(event) {
167          pagererReset();
168          var sliderBar = $(this).parent().get(0);
169          if (!sliderBar.pagererState.spinning) {
170            sliderBar.pagererState.spinning = true;
171            $(sliderBar).slider('option', 'value', sliderBar.pagererState.current);
172            $(this).text(indexToValue(sliderBar.pagererState.current, sliderBar.pagererState));
173            sliderBar.pagererState.spinning = false;
174          }
175        });
176
177      // Set slider bar dimensions.
178      sliderBar
179        .css('width', ((this.pagererState.quantity * 3) + 'em'))
180        .css('margin-left', sliderHandle.width() / 2)
181        .css('margin-right', sliderHandle.width() / 2);
182
183      var pixelsPerStep = sliderBar.width() / this.pagererState.total;
184      // If autodetection of navigation action, determine whether to
185      // use tickmark or timelapse.
186      if (this.pagererState.action === 'auto') {
187        if (pixelsPerStep > 3) {
188          this.pagererState.action = 'timelapse';
189        } else {
190          this.pagererState.action = 'tickmark';
191        }
192      }
193      // If autodetection of navigation icons, determine whether to
194      // hide icons.
195      if (this.pagererState.icons === 'auto' && pixelsPerStep > 3) {
196        $(this).parents('.pager').find('.pagerer-slider-control-icon').parent().hide();
197      }
198      // Add information to user to click on the tickmark to start page
199      // relocation.
200      if (this.pagererState.action === 'tickmark') {
201        var title = $(this).attr('title');
202        $(this).attr('title',  title + ' ' + this.pagererState.t
202ickmarkTitle);
203      }
204    })
205    .bind('slide', function(event, ui) {
206      pagererReset();
207      $(this).find('.ui-slider-handle').text(indexToValue(ui.value, this.pagererState));
208    })
209    .bind('slidechange', function(event, ui) {
210
211      var sliderBar = this;
212      var sliderHandle = $(this).find('.ui-slider-handle');
213      var sliderHandleIcon;
214
215      // Set handle text to widget value.
216      sliderHandle.text(indexToValue(ui.value, this.pagererState));
217
218      // If currently sliding the handle via navigation icons,
219      // do nothing.
220      if (this.pagererState.spinning) {
221        return false;
222      }
223
224      // Determine target page.
225      var targetPage = $(this).slider('option', 'value');
226
227      // Relocate immediately to target page if no
228      // tickmark/timelapse confirmation required.
229      if (this.pagererState.action === 'timelapse' && this.pagererState.timelapse === 0) {
230        sliderHandle.append("<div class='pagerer-slider-handle-icon'/>");
231        sliderHandleIcon = sliderHandle.find('.pagerer-slider-handle-icon');
232        pagererRelocate(this, sliderHandleIcon, targetPage);
233        return false;
234      }
235
236      // Otherwise, add a tickmark or clock icon to the handle text,
237      // to be clicked to activate page relocation.
238      sliderHandle.text(indexToValue(ui.value, this.pagererState) + ' ');
239      if (this.pagererState.action === 'timelapse') {
240        sliderHandle.append("<div class='pagerer-slider-handle-icon throbber'/>");
241      } else {
242        sliderHandle.append("<div class='pagerer-slider-handle-icon ui-icon ui-icon-check'/>");
243      }
244
245      // Bind page relocation to mouse clicking on the icon.
246      sliderHandleIcon = sliderHandle.find('.pagerer-slider-handle-icon');
247      sliderHandleIcon.bind('mousedown', function(event) {
248        pagererReset();
249        // Remove icon.
250        $(sliderBar).find('.pagerer-slider-handle-icon').removeClass('throbber');
251        // Relocate.
252        pagererRelocate(sliderBar, sliderHandleIcon, targetPage);
253        return false;
254      });
255
256      // Bind page relocation to timeout of timelapse.
257      if (this.pagererState.action === 'timelapse') {
258        pagererReset();
259        state.timeoutAction = setTimeout(function() {
260          // Remove icon.
261          $(sliderBar).find('.pagerer-slider-handle-icon').removeClass('ui-icon').removeClass('throbber');
262          // Relocate.
263          pagererRelocate(sliderBar, sliderHandleIcon, targetPage);
264          return false;
265        }, this.pagererState.timelapse);
266      }
267
268    });
269
270    /**
271      * pagerer-slider control icons event binding
272      *
273      * The navigation icons serve as an helper for the slider positioning,
274      * to fine-tune the selection. Once mouse is pressed on an icon, the
275      * slider handle is moved +/- one value. If mouse is kept pressed, the
276      * slider handle will move continuosly. When mouse is released or moved
277      * away from the icon, sliding will stop and the handle status will be
278      * processed through slider 'slidechange' event triggered by the
279      * sliderOffsetValue() function.
280      */
281    $('.pagerer-slider-control-icon', context)
282    .bind('mousedown', function(event) {
283      pagererReset();
284      var slider = $(this).parents('.pager').find('.pagerer-slider').get(0);
285      slider.pagererState.spinning = true;
286      var offset = $(this).hasClass('ui-icon-circle-minus') ? PAGERER_LEFT : PAGERER_RIGHT;
287      sliderOffsetValue(slider, offset);
288      state.intervalAction = setInterval(function(){
289        state.intervalCount++;
290        if (state.intervalCount > 10) {
291          sliderOffsetValue(slider, offset);
292        }
293      }, 50);
294    })
295    .bind('mouseup mouseleave', function() {
296      var slider = $(this).parents('.pager').find('.pagerer-slider').get(0);
297      if (slider.pagererState.spinning) {
298        state.intervalCount = 0;
299        clearInterval(state.intervalAction);
300        slider.pagererState.spinning = false;
301        sliderOffsetValue(slider, 0);
302        $(slider).find('.ui-slider-handle').focus();
303      }
304    });
305
306    /**
307     * 'pagerer-scrollpane' event binding.
308     */
309    $('.pagerer-scrollpane', context)
310    .ready().each(function(index) {
311      state.isRelocating = false;
312
313      // Get the scrollpane components, i.e. the viewport, the
314      // pager wrapped within it, and the wrapped pager elements.
315      var viewport = $(this).find('.item-list');
316      var pager = $(this).find('.pager').get(0);
317      var pagerElements = $(pager).find('li');
318      var pagerPages = $(pager).find('li:not(.separator)');
319      var pagerSeparators = $(pager).find('li.separator');
320
321      // Attach state variables to the wrapped pager.
322      pager.pagererState = pagererEvalState($(this).attr('id'));
323      $.extend(pager.pagererState, {
324        scrollpane: $(this).parent(),
325        viewport: viewport,
326        pageWidth: 0,
327        pageLeftMargin: 0,
328        separatorWidth: 0,
329        leftOverflow: 0,
330        rightOverflow: 0,
331        viewsAjaxContext: getViewsAjaxContext(this),
332        scrolling: false,
333        scrollingDuration: 0,
334        fastScrolling: 0
335      });
336
337      // Determine pager element width from maximum width possible.
338      var pageDupe = $(pagerPages[0]).clone();
339      pageDupe.removeClass('pager-current first last');
340      pageDupe.addClass('pager-item pagerer-dupe');
341      pageDupe.text(indexToValue(pager.pagererState.total - 1, pager.pagererState));
342      $(pager).append(pageDupe);
343      pager.pagererState.pageWidth = Math.ceil($(pageDupe).outerWidth(true));
344      pager.pagererState.pageLeftMargin = parseInt($(pageDupe).css('margin-left'));
345      var cellHeight = Math.ceil($(pageDupe).outerHeight(true));
346      $(pager).find('.pagerer-dupe').remove();
347
348      // Determine pager separator width, if existing.
349      if (pagerSeparators.length > 0) {
350        pager.pagererState.separatorWidth = Math.ceil($(pagerSeparators[0]).outerWidth(true));
351      }
352
353      // Set dimensions.
354      var pagerWidth = (pagerPages.length * pager.pagererState.pageWidth) + (pagerSeparators.length * pager.pagererState.separatorWidth);
355      var viewportWidth = Math.min((pager.pagererState.quantity * pager.pagererState.pageWidth) + ((pager.pagererState.quantity - 1) * pager.pagererState.separatorWidth), pagerWidth);
356      $(this).css({
357        width: viewportWidth + 'px',
358        height: cellHeight + 'px'
359      });
360      $(viewport).css({
361        width: viewportWidth + 'px',
362        height: cellHeight + 'px'
363      });
364      $(pager).css({
365        width: pagerWidth + 'px',
366        height: cellHeight + 'px'
367      });
368
369      // Allocate input pager elements to pager.
370      var elementLeft = 0;
371      var pagerCurrentPage = 0;
372      pagerElements.each(function(index) {
373        if (!$(this).hasClass('separator')) {
374          var pageWidth = $(this).outerWidth(true);
375          var pageLeftMargin = pager.pagererState.pageLeftMargin + ((pager.pagererState.pageWidth - pageWidth) / 2);
376          $(this).css('left', elementLeft + 'px');
377          $(this).css('margin-left', pageLeftMargin + 'px');
378          if ($(this).hasClass('pager-current')) {
379            pagerCurrentPage = index;
380          }
381          elementLeft += pager.pagererState.pageWidth;
382        } else {
383          $(this).css('left', elementLeft + 'px');
384          elementLeft += pager.pagererState.separatorWidth;
385        }
386      });
387
388      // Set current item to the middle of the viewport.
389      var pagerLeftPage = pagerCurrentPage - Math.floor(pager.pagererState.quantity / 2);
390      if (pagerLeftPage < 0) {
391        pagerLeftPage = 0;
392      } else if (pagerLeftPage > pagerPages.length - pager.pagererState.quantity) {
393        pagerLeftPage = pagerPages.length - pager.pagererState.quantity;
394      }
395      var pagerLeftOffset = $(pagerPages[pagerLeftPage]).css('left');
396      $(pager).css('left', '-' + pagerLeftOffset);
397
398      // Left- and right-most pages.
399      var pagerLeftPageIndex = valueToIndex($(pagerPages[0]).text(), pager.pagererState);
400      var pagerRightPageIndex = valueToIndex($(pagerPages[pagerPages.length - 1]).text(), pager.pagererState);
401
402      // Add elements to the left.
403      pager.pagererState.leftOverflow = scrollpaneAddPagerElements(
404        pager,
405        PAGERER_LEFT,
406        pagerLeftPageIndex - 1,
407        pager.pagererState.quantity,
408        true
409      );
410
411      // Add elements to the right.
412      pager.pagererState.rightOverflow = scrollpaneAddPagerElements(
413        pager,
414        PAGERER_RIGHT,
415        pagerRightPageIndex + 1,
416        pager.pagererState.quantity,
417        true
418      );
419
420    });
421
422    /**
423      * pagerer-scrollpane buttons event binding
424      *
425      * The navigation buttons shift the entire pager embedded in the
426      * scrollpane viewport.
427      * Once mouse is pressed on a prev/next button, the pager is moved
428      * right/left by one position. If mouse is kept pressed, the pager will
429      * shift continuosly. When mouse is released or moved away from the icon,
430      * shifting will stop.
431      * If mouse is pressed on a first/last button, the pager is moved to
432      * first/last page.
433      */
434    $('.pagerer-scrollpane-button', context)
435    .ready().each(function(index) {
436      this.pagererState = {
437        scrollpane: $(this).parents('.pager').get(0),
438        pager: $(this).parents('.pager').find('.pagerer-scrollpane').find('.item-list').find('.pager').get(0)
439      };
440      $(this).button();
441      $(this)
442      .bind('mousedown', function(event) {
443        var button = this;
444        var pager = button.pagererState.pager;
445        var scope;
446
447        // Return immediately if button is disabled.
448        if ($(button).button('option', 'disabled')) {
449          return false;
450        }
451
452        // Determine scope of scroll request.
453        if ($(button).hasClass('pagerer-next')) {
454          scope = 'next';
455        } else if ($(button).hasClass('pagerer-previous')) {
456          scope = 'previous';
457        } else if ($(button).hasClass('pagerer-first')) {
458          scope = 'first';
459        } else if ($(button).hasClass('pagerer-last')) {
460          scope = 'last';
461        }
462
463        // If scrollpane is currently transitioning, and a request for a
464        // different scope is received, reset all transitions.
465        if (pager.pagererState.scrolling && pager.pagererState.scrolling !== scope) {
466          pagererReset();
467        }
468
469        // Transition duration based on single click.
470        switch (pager.pagererState.scrollingDuration) {
471          case 0:
472            pager.pagererState.scrollingDuration = 500;
473            break;
474
475          case 500:
476          case 200:
477            pager.pagererState.scrollingDuration = 200;
478            break;
479
480        }
481        scrollpaneScrollRequestEnqueue(pager, scope, pager.pagererState.scrollingDuration);
482
483        // If button is kept pressed long enough, start fastScrolling mode.
484        if ((scope === 'previous' || scope === 'next') && !$(button).button('option', 'disabled')) {
485          state.timeoutAction = setTimeout(function() {
486            pager.pagererState.fastScrolling = 1;
487            scrollpaneScrollRequestEnqueue(pager, scope, scrollpaneGetScrollDuration(pager));
488          }, pager.pagererState.scrollingDuration + 20);
489        }
490      })
491      .bind('mouseup mouseleave', function(event) {
492        // Stop fastScrolling mode if active.
493        var button = this;
494        var pager = button.pagererState.pager;
495        clearTimeout(state.timeoutAction);
496        pager.pagererState.fastScrolling = 0;
497      });
498    })
499    .load().each(function(index) {
500      // Aligns viewport border color to button style.
501      if ($(this).hasClass('pagerer-first')) {
502        this.pagererState.pager.pagererState.viewport.css({
503          'border-top-color' : $(this).css('border-top-color'),
504          'border-right-color' : $(this).css('border-right-color'),
505          'border-bottom-color' : $(this).css('border-bottom-color'),
506          'border-left-color' : $(this).css('border-left-color')
507        });
508      }
509      // Set button enable/disabled state.
510      scrollpaneSetButtonState(this);
511    });
512
513    /**
514     * Helper functions
515     */
516
517    /**
518     * Return page text from zero-based page index number.
519     */
520    function indexToValue(index, state) {
521      switch(state.display) {
522        case 'pages':
523          return Drupal.formatString(state.pageTag, {'@number': index + 1});
524
525        case 'items':
526          return Drupal.formatString(state.pageTag, {'@number': (index * state.interval) + 1});
527
528        case 'item_ranges':
529          return Drupal.formatString('@min@separator@max', {
530            '@min': Drupal.formatString(state.pageTag, {'@number': (index * state.interval) + 1}),
531            '@separator': state.rangeSeparator,
532            '@max': Drupal.formatString(state.pageTag, {'@number': Math.min(((index + 1) * state.interval), state.totalItems)})
533          });
534
535      }
536    }
537
538    /**
539     * Return zero-based page index number from textual value.
540     */
541    function valueToIndex(value, state) {
542      switch(state.display) {
543        case 'pages':
544          if (isNaN(value)) {
545            return 0;
546          }
547          value = parseInt(value);
548          if (value < 1) {
549            return 0;
550          }
551          if (value > state.total) {
552            value = state.total;
553          }
554          return value - 1;
555
556        case 'items':
557          if (isNaN(value)) {
558            return 0;
559          }
560          value = parseInt(value);
561          if (value < 1) {
562            return 0;
563          }
564          if (value > state.totalItems) {
565            value = state.totalItems;
566          }
567          return parseInt((value - 1) / state.interval);
568
569        case 'item_ranges':
570          var values = value.split(state.rangeSeparator);
571          value = values[0];
572          if (isNaN(value)) {
573            return 0;
574          }
575          value = parseInt(value);
576          if (value < 1) {
577            return 0;
578          }
579          if (value > state.totalItems) {
580            value = state.totalItems;
581          }
582          return parseInt((value - 1) / state.interval);
583
584      }
585    }
586
587    /**
588     * Return an element's pagererState from the HTML attribute.
589     */
590    function pagererEvalState(stringState) {
591      var pagererState = eval('(' + stringState + ');');
592      return pagererState;
593    }
594
595    /**
596     * Reset pending transitions.
597     *
598     * Cancel timeout-bound page relocation and any unprocessed scrollpane
599     * transition.
600     */
601    function pagererReset() {
602      if (state.timeoutAction) {
603        clearTimeout(state.timeoutAction);
604      }
605      $('.pagerer-scrollpane').find('.pager').each(function(index) {
606        var pager = this;
607        $(pager).clearQueue('pagererQueue');
608        $(pager).stop(false, true);
609        pager.pagererState.scrolling = false;
610        pager.pagererState.scrollingDuration = 0;
611        pager.pagererState.fastScrolling = 0;
612      });
613    }
614
615    /**
616     * Relocate client browser to target page.
617     *
618     * Relocation method is decided based on the context of the pager element,
619     * being in order of priority:
620     *  - a AJAX enabled Views context - AJAX is used
621     *  - a Views preview area in a Views settings form - AJAX is used
622     *  - a page rendered through the admin overlay - BBQ is used
623     *  - a normal page - document.location is used
624     */
625    function pagererRelocate(element, ajaxAttachElement, targetPage) {
626      // Check we are not relocating already.
627      if (state.isRelocating) {
628        return false;
629      }
630      state.isRelocating = true;
631
632      // Replace placeholder with page target.
633      var path = element.pagererState.path.replace(/pagererpage/, targetPage);
634
635      // Check if element is in Views AJAX context.
636      var viewsAjaxContext = getViewsAjaxContext(element);
637      if (viewsAjaxContext) {
638        // Element is in Views AJAX context.
639        attachViewsAjax(ajaxAttachElement, 'doViewsAjax', viewsAjaxContext, path);
640        $(ajaxAttachElement).trigger('doViewsAjax');
641
642      } else if ($(element).parents('#views-live-preview').length) {
643        // Element is in Views preview context.
644        var base = $(element).attr('id');
645        var element_settings = {
646          'event': 'doViewsAjaxPreview',
647          'progress': { 'type': 'throbber' },
648          'url': Drupal.settings.basePath + path,
649          'method': 'html',
650          'wrapper': 'views-live-preview'
651        };
652        Drupal.ajax[base] = new Drupal.ajax(base, element, element_settings);
653        $(element).trigger('doViewsAjaxPreview');
654
655      } else if (window.Drupal.overlayChild) {
656        // Drupal admin overlay
657        window.parent.jQuery.bbq.pushState({'overlay': path});
658
659      } else {
660        // Normal page
661        document.location = Drupal.settings.basePath + path;
662
663      }
664    }
665
666    /**
667     * Widget - Update value based on an offset.
668     */
669    function widgetOffsetValue(element, offset) {
670      var widgetValue = valueToIndex($(element).val(), element.pagererState);
671      var newValue = widgetValue + offset;
672      if (newValue < 0) {
673        newValue = 0;
674      } else if (newValue >= element.pagererState.total) {
675        newValue = element.pagererState.total - 1;
676      }
677      $(element).val(indexToValue(newValue, element.pagererState));
678    }
679
680    /**
681     * Slider - Update value based on an offset.
682     */
683    function sliderOffsetValue(element, offset) {
684      var newValue = $(element).slider('option', 'value') + offset;
685      var maxValue = $(element).slider('option', 'max');
686      if (newValue >= 0 && newValue <= maxValue) {
687        $(element).slider('option', 'value', newValue);
688      }
689    }
690
691    /**
692     * Scrollpane - Enqueue a scrollpane scroll request.
693     *
694     * Scrolls embedded pager to first/previous/next/last 'scope' in a
695     * 'duration' timelapse.
696     */
697    function scrollpaneScrollRequestEnqueue(pager, scope, duration) {
698      $(pager).queue('pagererQueue', function() {
699        pager.pagererState.scrolling = scope;
700
701        // In fastScrolling mode, enqueue next iteration straight ahead.
702        if (pager.pagererState.fastScrolling) {
703          pager.pagererState.fastScrolling++;
704          scrollpaneScrollRequestEnqueue(pager, scope, scrollpaneGetScrollDuration(pager));
705        }
706
707        var pagerPages = $(pager).find('li:not(.separator)');
708        var first = valueToIndex($(pagerPages[0]).text(), pager.pagererState);
709        var last = valueToIndex($(pagerPages[pagerPages.length - 1]).text(), pager.pagererState);
710        var addedElements;
711
712        switch (scope) {
713          // ***** Next - shift left.
714          case 'next':
715            // Add a pager element on the right.
716            addedElements = scrollpaneAddPagerElements(pager, PAGERER_RIGHT, last + 1, 1);
717            if (pager.pagererState.leftOverflow < pager.pagererState.quantity) {
718              // There's space on the left side to shift pager.
719              if (pager.pagererState.rightOverflow > 0) {
720                // Pager overflows to the right, so shift pager to the left.
721                scrollpaneShiftPager(pager, PAGERER_LEFT, 1, duration);
722                return;
723              }
724            } else {
725              // No space on the left side to shift pager.
726              if (addedElements || pager.pagererState.rightOverflow > 0) {
727                // Remove first element on the left, then shift pager one
728                // position to the left.
729                scrollpaneRemovePagerElements(pager, PAGERER_LEFT, 1);
730                scrollpaneShiftPager(pager, PAGERER_LEFT, 1, duration);
731                return;
732              }
733            }
734            break;
735
736          // ***** Previous - shift right.
737          case 'previous':
738            // Add a pager element on the left.
739            addedElements = scrollpaneAddPagerElements(pager, PAGERER_LEFT, first - 1, 1);
740            if (pager.pagererState.rightOverflow < pager.pagererState.quantity) {
741              // There's space on the right side to shift pager.
742              if (pager.pagererState.leftOverflow > 0) {
743                // Pager overflows to the left, so shift pager to the right.
744                scrollpaneShiftPager(pager, PAGERER_RIGHT, 1, duration);
745                return;
746              }
747            } else {
748              // No space on the right side to shift pager.
749              if (addedElements || pager.pagererState.leftOverflow > 0) {
750                // Remove first element on the right, then shift pager one
751                // position to the right.
752                scrollpaneRemovePagerElements(pager, PAGERER_RIGHT, 1);
753                scrollpaneShiftPager(pager, PAGERER_RIGHT, 1, duration);
754                return;
755              }
756            }
757            break;
758
759          // ***** First.
760          case 'first':
761            var fromEl = Math.min((pager.pagererState.quantity * 2) - 1, first - 1);
762            addedElements = scrollpaneAddPagerElements(pager, PAGERER_LEFT, fromEl, pager.pagererState.quantity * 2);
763            scrollpaneShiftPager(
764              pager,
765              PAGERER_RIGHT,
766              pager.pagererState.leftOverflow,
767              duration,
768              function() {
769                if (pager.pagererState.rightOverflow > pager.pagererState.quantity) {
770                  scrollpaneRemovePagerElements(pager, PAGERER_RIGHT, pager.pagererState.rightOverflow - pager.pagererState.quantity);
771                }
772              }
773            );
774            return;
775
776          // ***** Last.
777          case 'last':
778            var fromEl = Math.max((pager.pagererState.total - (pager.pagererState.quantity * 2)), last + 1);
779            addedElements = scrollpaneAddPagerElements(pager, PAGERER_RIGHT, fromEl, pager.pagererState.quantity * 2);
780            scrollpaneShiftPager(
781              pager,
782              PAGERER_LEFT,
783              pager.pagererState.rightOverflow,
784              duration,
785              function() {
786                if (pager.pagererState.leftOverflow > pager.pagererState.quantity) {
787                  scrollpaneRemovePagerElements(pager, PAGERER_LEFT, pager.pagererState.leftOverflow - pager.pagererState.quantity);
788                }
789              }
790            );
791            return;
792
793        }
794
795        // Dequeue next iteration in the queue.
796        scrollpaneScrollRequestDequeue(pager);
797
798      });
799
800      // Starts the queue processing.
801      if (pager.pagererState.scrolling === false) {
802        $(pager).dequeue('pagererQueue');
803      }
804    }
805
806    /**
807     * Scrollpane - Dequeue a scrollpane scroll request.
808     *
809     * If no more requests in the queue, clear state variables.
810     */
811    function scrollpaneScrollRequestDequeue(pager) {
812      if ($(pager).queue('pagererQueue').length > 0) {
813        $(pager).dequeue('pagererQueue');
814      } else {
815        pager.pagererState.scrolling = false;
816        pager.pagererState.scrollingDuration = 0;
817        pager.pagererState.fastScrolling = 0;
818      }
819    }
820
821    /**
822     * Scrollpane - Get duration of next scroll transition.
823     */
824    function scrollpaneGetScrollDuration(pager) {
825      var ret = ((pager.pagererState.fastScrolling - 1) * -19.8) + 200;
826      return (ret > 2) ? ret : 2;
827    }
828
829    /**
830     * Scrollpane - Enable/disable scrollpane buttons.
831     */
832    function scrollpaneSetButtonState(element) {
833      if ($(element).hasClass('pagerer-first') || $(element).hasClass('pagerer-previous')) {
834        if (element.pagererState.pager.pagererState.leftOverflow === 0) {
835          $(element).mouseup().mouseleave();
836          $(element).button('disable');
837        } else {
838          $(element).button('enable');
839        }
840      }
841      if ($(element).hasClass('pagerer-next') || $(element).hasClass('pagerer-last')) {
842        if (element.pagererState.pager.pagererState.rightOverflow === 0) {
843          $(element).mouseup().mouseleave();
844          $(element).button('disable');
845        } else {
846          $(element).button('enable');
847        }
848      }
849    }
850
851    /**
852     * Scrollpane - Add pages to the embedded pager.
853     *
854     * Add 'count' pages and separators on left/right 'side', starting with
855     * page at index 'start'.
856     */
857    function scrollpaneAddPagerElements(pager, side, start, count, onReady) {
858
859      // onReady will be true if function is invoked at .ready()
860      onReady = onReady || false;
861
862      var pagerPages;
863      var pagerLeftPage;
864      var pagerRightPage;
865      var pageWidth;
866      var pageLeftMargin;
867      var pageDupe;
868      var pagerSeparators;
869      var separatorWidth = 0;
870      var separatorDupe;
871
872      for (var i = 0; i < count; i++) {
873        pagerPages = $(pager).find('li:not(.separator)');
874        pagerSeparators = $(pager).find('li.separator');
875
876        // If we have separators, prepare dupe and set width.
877        if (pagerSeparators.length) {
878          separatorDupe = $(pagerSeparators[0]).clone();
879          separatorWidth = pager.pagererState.separatorWidth;
880        }
881
882        // Add page and separator.
883        if (side === PAGERER_RIGHT) {
884          pagerRightPage = pagerPages.length - 1;
885          if (valueToIndex($(pagerPages[pagerRightPage]).text(), pager.pagererState) >= (pager.pagererState.total - 1)) {
886            break;
887          }
888          pageDupe = $(pagerPages[pagerRightPage]).clone();
889          $(pagerPages[pagerRightPage]).removeClass('last');
890          scrollpaneSetPagerElementHTML(pageDupe, pager, start + i, onReady);
891          if (separatorWidth) {
892            $(separatorDupe).css('left', (parseInt($(pageDupe).css('left')) + pager.pagererState.pageWidth) + 'px');
893            $(pager).append(separatorDupe);
894          }
895          $(pageDupe).css('left', (parseInt($(pageDupe).css('left')) + pager.pagererState.pageWidth + separatorWidth) + 'px');
896          $(pager).append(pageDupe);
897          pageWidth = $(pageDupe).outerWidth(true);
898          pageLeftMargin = pager.pagererState.pageLeftMargin + ((pager.pagererState.pageWidth - pageWidth) / 2);
899          $(pageDupe).css('margin-left', pageLeftMargin + 'px');
900          pager.pagererState.rightOverflow++;
901        } else if (side === PAGERER_LEFT) {
902          pagerLeftPage = 0;
903          if (valueToIndex($(pagerPages[pagerLeftPage]).text(), pager.pagererState) === 0) {
904            break;
905          }
906          pageDupe = $(pagerPages[pagerLeftPage]).clone();
907          $(pagerPages[pagerLeftPage]).removeClass('first');
908          scrollpaneSetPagerElementHTML(pageDupe, pager, start - i, onReady);
909          if (separatorWidth) {
910            $(separatorDupe).css('left', (parseInt($(pageDupe).css('left')) - separatorWidth) + 'px');
911            $(pager).prepend(separatorDupe);
912          }
913          $(pageDupe).css('left', (parseInt($(pageDupe).css('left')) - pager.pagererState.pageWidth - separatorWidth) + 'px');
914          $(pager).prepend(pageDupe);
915          pageWidth = $(pageDupe).outerWidth(true);
916          pageLeftMargin = pager.pagererState.pageLeftMargin + ((pager.pagererState.pageWidth - pageWidth) / 2);
917          $(pageDupe).css('margin-left', pageLeftMargin + 'px');
918          pager.pagererState.leftOverflow++;
919        }
920      }
921      // Resize pager.
922      pagerPages = $(pager).find('li:not(.separator)');
923      pagerSeparators = $(pager).find('li.separator');
924      var pagerWidth = (pagerPages.length * pager.pagererState.pageWidth) + (pagerSeparators.length * pager.pagererState.separatorWidth);
925      $(pager).css('width', pagerWidth + 'px');
926      // If elements were added on the left side, pager and elements will be
927      // misplaced, so reposition the elements.
928      if (side === PAGERER_LEFT) {
929        $(pager).css({
930          left: (parseInt($(pager).css('left')) - (pager.pagererState.pageWidth * i) - (pager.pagererState.separatorWidth * i)) + 'px'
931        });
932        scrollpaneShiftPagerElements(pager, PAGERER_RIGHT, i);
933      }
934      return i;
935    }
936
937    /**
938     * Scrollpane - Remove pages from the embedded pager.
939     *
940     * Remove 'count' pages and separators on left/right 'side'.
941     */
942    function scrollpaneRemovePagerElements(pager, side, count) {
943      var pagerPages;
944      var pagerSeparators;
945      for (var i = 0; i < count; i++) {
946        pagerPages = $(pager).find('li:not(.separator)');
947        pagerSeparators = $(pager).find('li.separator');
948        if (side === PAGERER_RIGHT) {
949          $(pagerPages[pagerPages.length - 1]).remove();
950          $(pagerPages[pagerPages.length - 1]).addClass('last');
951          if (pagerSeparators.length) {
952            $(pagerSeparators[pagerSeparators.length - 1]).remove();
953          }
954          pager.pagererState.rightOverflow--;
955        } else if (side === PAGERER_LEFT) {
956          $(pagerPages[0]).remove();
957          $(pagerPages[0]).addClass('first');
958          if (pagerSeparators.length) {
959            $(pagerSeparators[0]).remove();
960          }
961          pager.pagererState.leftOverflow--;
962        }
963      }
964      // Resize pager.
965      var pagerWidth = ((pagerPages.length - 1) * pager.pagererState.pageWidth) + ((pagerSeparators.length - 1) * pager.pagererState.separatorWidth);
966      $(pager).css('width', pagerWidth + 'px');
967      // If elements were removed on the left side, the remaining ones will
968      // be misplaced wihin the pager, so reposition them.
969      if (side === PAGERER_LEFT) {
970        $(pager).css({
971          left: (parseInt($(pager).css('left')) + ((pager.pagererState.pageWidth + pager.pagererState.separatorWidth) * count)) + 'px'
972        });
973        scrollpaneShiftPagerElements(pager, PAGERER_LEFT, i);
974      }
975      return true;
976    }
977
978    /**
979     * Scrollpane - Shift the embedded pager elements.
980     *
981     * Shift the elements of the embedded pager by 'count' pages in
982     * left/right 'direction'.
983     */
984    function scrollpaneShiftPagerElements(pager, direction, count) {
985      var pagerElements = $(pager).find('li');
986      pagerElements.each(function(index) {
987        $(this).css({
988          left: (parseInt($(this).css('left')) + (direction * (pager.pagererState.pageWidth + pager.pagererState.separatorWidth) * count)) + 'px'
989        });
990      });
991    }
992
993    /**
994     * Scrollpane - Shift the embedded pager in the viewport.
995     *
996     * Shift the entire pager by 'count' pages in left/right 'direction'.
997     * If 'duration' is set (msec), the shift will be jQuery animated.
998     * A 'complete' callback is executed at completion if set.
999     * Overall pager shift is executed in a jQuery queue, so next action is
1000     * dequeued at the end of the call (for execution after the animation
1001     * is completed).
1002     */
1003    function scrollpaneShiftPager(pager, direction, count, duration, complete) {
1004      var left = parseInt($(pager).css('left'));
1005      var offset = direction * count * (pager.pagererState.pageWidth + pager.pagererState.separatorWidth);
1006      $(pager).animate({
1007        left: (left + offset) + 'px'
1008      },
1009      {
1010        duration: duration,
1011        queue: false,
1012        complete: function() {
1013          pager.pagererState.leftOverflow -= direction * count;
1014          pager.pagererState.rightOverflow += direction * count;
1015          if (typeof complete !== 'undefined') {
1016            complete();
1017          }
1018          if (pager.pagererState.leftOverflow <= 1 || pager.pagererState.rightOverflow <= 1) {
1019            $(pager.pagererState.scrollpane).find('.ui-button').each(function() {
1020              scrollpaneSetButtonState(this);
1021            });
1022          }
1023          scrollpaneScrollRequestDequeue(pager);
1024        }
1025      });
1026    }
1027
1028    /**
1029     * Scrollpane - Set HTML of a page element in the pager.
1030     */
1031    function scrollpaneSetPagerElementHTML(element, pager, targetPage, onReady) {
1032
1033      // onReady will be true if function is invoked at .ready()
1034      onReady = onReady || false;
1035
1036      if (targetPage !== pager.pagererState.current) {
1037        $(element[0]).removeClass('pager-current').addClass('pager-item');
1038        var anchor = $(element).find('a');
1039        if (!anchor.length) {
1040          $(element).text('');
1041          $(element).append('<a></a>');
1042          anchor = $(element).find('a');
1043        }
1044        // Format hyperlink.
1045        var path = pager.pagererState.path.replace(/pagererpage/, targetPage);
1046        var pageText = indexToValue(targetPage, pager.pagererState);
1047        anchor[0].href = Drupal.settings.basePath + path;
1048        $(anchor[0]).text(pageText);
1049        if (targetPage === 0) {
1050          anchor[0].title = Drupal.formatString(pager.pagererState.firstTitle, {'@number': pageText});
1051        } else if (targetPage === pager.pagererState.total - 1) {
1052          anchor[0].title = Drupal.formatString(pager.pagererState.lastTitle, {'@number': pageText});
1053        } else {
1054          anchor[0].title = Drupal.formatString(pager.pagererState.pageTitle, {'@number': pageText});
1055        }
1056        // In views, add AJAX where appropriate.
1057        if (!onReady && pager.pagererState.viewsAjaxContext) {
1058          // Element is in AJAX enabled view.
1059          attachViewsAjax(anchor[0], 'click', pager.pagererState.viewsAjaxContext, path);
1060        }  else if ($(pager).parents('#views-live-preview').length) {
1061          // Element is in Views preview context.
1062          var base = $(element).attr('id');
1063          var element_settings = {
1064            'event': 'click',
1065            'progress': { 'type': 'throbber' },
1066            'url': Drupal.settings.basePath + path,
1067            'method': 'html',
1068            'wrapper': 'views-live-preview'
1069          };
1070          Drupal.ajax[base] = new Drupal.ajax(base, element, element_settings);
1071        }
1072      } else {
1073        // Current page has its own class, and no href.
1074        $(element[0]).removeClass('pager-item').addClass('pager-current');
1075        $(element[0]).text(indexToValue(targetPage, pager.pagererState));
1076      }
1077    }
1078
1079    /**
1080     * Views - Check if element is part of an AJAX enabled view.
1081     */
1082    function getViewsAjaxContext(element) {
1083      if (Drupal.settings && Drupal.settings.views && Drupal.settings.views.ajaxViews) {
1084        // Loop through active Views Ajax elements.
1085        for (var i in Drupal.settings.views.ajaxViews) {
1086          var view = '.view-dom-id-' + Drupal.settings.views.ajaxViews[i].view_dom_id;
1087          var viewDiv = $(element).parents(view);
1088          if (viewDiv.size()) {
1089            return {
1090              target: viewDiv.get(0),
1091              settings: Drupal.settings.views.ajaxViews[i],
1092              selector: view
1093            };
1094          }
1095        }
1096      }
1097      return false;
1098    }
1099
1100    /**
1101     * Views - Attach Views AJAX behaviour to an element.
1102     */
1103    function attachViewsAjax(element, event, viewContext, path) {
1104
1105      // Link to the element.
1106      var $link = $(element);
1107
1108      // Retrieve the path to use for views' ajax.
1109      var ajax_path = Drupal.settings.views.ajax_path;
1110
1111      // If there are multiple views this might've ended up showing up multiple times.
1112      if (ajax_path.constructor.toString().indexOf('Array') !== -1) {
1113        ajax_path = ajax_path[0];
1114      }
1115
1116      // Check if there are any GET parameters to send to views.
1117      var queryString = window.location.search || '';
1118      if (queryString !== '') {
1119        // Remove the question mark and Drupal path component if any.
1120        var queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, '');
1121        if (queryString !== '') {
1122          // If there is a '?' in ajax_path, clean url are on and & should be used to add parameters.
1123          queryString = ((/\?/.test(ajax_path)) ? '&' : '?') + queryString;
1124        }
1125      }
1126
1127      // Load view's settings and parse pagerer path.
1128      var viewData = {};
1129      $.extend(
1130        viewData,
1131        viewContext.settings,
1132        Drupal.Views.parseQueryString(Drupal.settings.basePath + path),
1133        Drupal.Views.parseViewArgs(Drupal.settings.basePath + path, viewContext.settings.view_base_path)
1134      );
1135
1136      // Load AJAX element_settings object and attach AJAX behaviour.
1137      var elementAjaxSettings = {
1138        url: ajax_path + queryString,
1139        submit: viewData,
1140        setClick: true,
1141        event: event,
1142        selector: viewContext.selector,
1143        progress: { type: 'throbber' }
1144      };
1145      viewContext.pagerAjax = new Drupal.ajax(false, $link, elementAjaxSettings);
1146    }
1147
1148  }
1149};
1150})(jQuery);
1151;
1152
1153(function($) {
1154
1155/**
1156 * Drupal FieldGroup object.
1157 */
1158Drupal.FieldGroup = Drupal.FieldGroup || {};
1159Drupal.FieldGroup.Effects = Drupal.FieldGroup.Effects || {};
1160Drupal.FieldGroup.groupWithfocus = null;
1161
1162Drupal.FieldGroup.setGroupWithfocus = function(element) {
1163  element.css({display: 'block'});
1164  Drupal.FieldGroup.groupWithfocus = element;
1165}
1166
1167/**
1168 * Implements Drupal.FieldGroup.processHook().
1169 */
1170Drupal.FieldGroup.Effects.processFieldset = {
1171  execute: function (context, settings, type) {
1172    if (type == 'form') {
1173      // Add required fields mark to any fieldsets containing required fields
1174      $('fieldset.fieldset', context).once('fieldgroup-effects', function(i) {
1175        if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
1176          $('legend span.fieldset-legend', $(this)).eq(0).append(' ').append($('.form-required').eq(0).clone());
1177        }
1178        if ($('.error', $(this)).length) {
1179          $('legend span.fieldset-legend', $(this)).eq(0).addClass('error');
1180          Drupal.FieldGroup.setGroupWithfocus($(this));
1181        }
1182      });
1183    }
1184  }
1185}
1186
1187/**
1188 * Implements Drupal.FieldGroup.processHook().
1189 */
1190Drupal.FieldGroup.Effects.processAccordion = {
1191  execute: function (context, settings, type) {
1192    $('div.field-group-accordion-wrapper', context).once('fieldgroup-effects', function () {
1193      var wrapper = $(this);
1194
1195      // Get the index to set active.
1196      var active_index = false;
1197      wrapper.find('.accordion-item').each(function(i) {
1198        if ($(this).hasClass('field-group-accordion-active')) {
1199          active_index = i;
1200        }
1201      });
1202
1203      wrapper.accordion({
1204        heightStyle: "content",
1205        active: active_index,
1206        collapsible: true,
1207        changestart: function(event, ui) {
1208          if ($(this).hasClass('effect-none')) {
1209            ui.options.animated = false;
1210          }
1211          else {
1212            ui.options.animated = 'slide';
1213          }
1214        }
1215      });
1216
1217      if (type == 'form') {
1218
1219        var $firstErrorItem = false;
1220
1221        // Add required fields mark to any element containing required fields
1222        wrapper.find('div.field-group-accordion-item').each(function(i) {
1223
1224          if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
1225            $('h3.ui-accordion-header a').eq(i).append(' ').append($('.form-required').eq(0).clone());
1226          }
1227          if ($('.error', $(this)).length) {
1228            // Save first error item, for focussing it.
1229            if (!$firstErrorItem) {
1230              $firstErrorItem = $(this).parent().accordion("activate" , i);
1231            }
1232            $('h3.ui-accordion-header').eq(i).addClass('error');
1233          }
1234        });
1235
1236        // Save first error item, for focussing it.
1237        if (!$firstErrorItem) {
1238          $('.ui-accordion-content-active', $firstErrorItem).css({height: 'auto', width: 'auto', display: 'block'});
1239        }
1240
1241      }
1242    });
1243  }
1244}
1245
1246/**
1247 * Implements Drupal.FieldGroup.processHook().
1248 */
1249Drupal.FieldGroup.Effects.processHtabs = {
1250  execute: function (context, settings, type) {
1251    if (type == 'form') {
1252      // Add required fields mark to any element containing required fields
1253      $('fieldset.horizontal-tabs-pane', context).once('fieldgroup-effects', function(i) {
1254        if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
1255          $(this).data('horizontalTab').link.find('strong:first').after($('.form-required').eq(0).clone()).after(' ');
1256        }
1257        if ($('.error', $(this)).length) {
1258          $(this).data('horizontalTab').link.parent().addClass('error');
1259          Drupal.FieldGroup.setGroupWithfocus($(this));
1260          $(this).data('horizontalTab').focus();
1261        }
1262      });
1263    }
1264  }
1265}
1266
1267/**
1268 * Implements Drupal.FieldGroup.processHook().
1269 */
1270Drupal.FieldGroup.Effects.processTabs = {
1271  execute: function (context, settings, type) {
1272    if (type == 'form') {
1273
1274      var errorFocussed = false;
1275
1276      // Add required fields mark to any fieldsets containing required fields
1277      $('fieldset.vertical-tabs-pane', context).once('fieldgroup-effects', function(i) {
1278        if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
1279          $(this).data('verticalTab').link.find('strong:first').after($('.form-required').eq(0).clone()).after(' ');
1280        }
1281        if ($('.error', $(this)).length) {
1282          $(this).data('verticalTab').link.parent().addClass('error');
1283          // Focus the first tab with error.
1284          if (!errorFocussed) {
1285            Drupal.FieldGroup.setGroupWithfocus($(this));
1286            $(this).data('verticalTab').focus();
1287            errorFocussed = true;
1288          }
1289        }
1290      });
1291    }
1292  }
1293}
1294
1295/**
1296 * Implements Drupal.FieldGroup.processHook().
1297 *
1298 * TODO clean this up meaning check if this is really
1299 *      necessary.
1300 */
1301Drupal.FieldGroup.Effects.processDiv = {
1302  execute: function (context, settings, type) {
1303
1304    $('div.collapsible', context).once('fieldgroup-effects', function() {
1305      var $wrapper = $(this);
1306
1307      // Turn the legend into a clickable link, but retain span.field-group-format-toggler
1308      // for CSS positioning.
1309
1310      var $toggler = $('span.field-group-format-toggler:first', $wrapper);
1311      var $link = $('<a class="field-group-format-title" href="#"></a>');
1312      $link.prepend($toggler.contents());
1313
1314      // Add required field markers if needed
1315      if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
1316        $link.append(' ').append($('.form-required').eq(0).clone());
1317      }
1318
1319      $link.appendTo($toggler);
1320
1321      // .wrapInner() does not retain bound events.
1322      $link.click(function () {
1323        var wrapper = $wrapper.get(0);
1324        // Don't animate multiple times.
1325        if (!wrapper.animating) {
1326          wrapper.animating = true;
1327          var speed = $wrapper.hasClass('speed-fast') ? 300 : 1000;
1328          if ($wrapper.hasClass('effect-none') && $wrapper.hasClass('speed-none')) {
1329            $('> .field-group-format-wrapper', wrapper).toggle();
1330          }
1331          else if ($wrapper.hasClass('effect-blind')) {
1332            $('> .field-group-format-wrapper', wrapper).toggle('blind', {}, speed);
1333          }
1334          else {
1335            $('> .field-group-format-wrapper', wrapper).toggle(speed);
1336          }
1337          wrapper.animating = false;
1338        }
1339        $wrapper.toggleClass('collapsed');
1340        return false;
1341      });
1342
1343    });
1344  }
1345};
1346
1347/**
1348 * Behaviors.
1349 */
1350Drupal.behaviors.fieldGroup = {
1351  attach: function (context, settings) {
1352    settings.field_group = settings.field_group || Drupal.settings.field_group;
1353    if (settings.field_group == undefined) {
1354      return;
1355    }
1356
1357    // Execute all of them.
1358    $.each(Drupal.FieldGroup.Effects, function (func) {
1359      // We check for a wrapper function in Drupal.field_group as
1360      // alternative for dynamic string function calls.
1361      var type = func.toLowerCase().replace("process", "");
1362      if (settings.field_group[type] != undefined && $.isFunction(this.execute)) {
1363        this.execute(context, settings, settings.field_group[type]);
1364      }
1365    });
1366
1367    // Fixes css for fieldgroups under vertical tabs.
1368    $('.fieldset-wrapper .fieldset > legend').css({display: 'block'});
1369    $('.vertical-tabs fieldset.fieldset').addClass('default-fallback');
1370
1371    // Add a new ID to each fieldset.
1372    $('.group-wrapper .horizontal-tabs-panes > fieldset', context).once('group-wrapper-panes-processed', function() {
1373      // Tats bad, but we have to keep the actual id to prevent layouts to break.
1374      var fieldgroupID = 'field_group-' + $(this).attr('id');
1375      $(this).attr('id', fieldgroupID);
1376    });
1377    // Set the hash in url to remember last userselection.
1378    $('.group-wrapper ul li').once('group-wrapper-ul-processed', function() {
1379      var fieldGroupNavigationListIndex = $(this).index();
1380      $(this).children('a').click(function() {
1381        var fieldset = $('.group-wrapper fieldset').get(fieldGroupNavigationListIndex);
1382        // Grab the first id, holding the wanted hashurl.
1383        var hashUrl = $(fieldset).attr('id').replace(/^field_group-/, '').split(' ')[0];
1384        window.location.hash = hashUrl;
1385      });
1386    });
1387
1388  }
1389};
1390
1391})(jQuery);
1392;
1393/**
1394 * @file
1395 */
1396
1397(function ($) {
1398
1399  'use strict';
1400
1401  Drupal.extlink = Drupal.extlink || {};
1402
1403  Drupal.extlink.attach = function (context, settings) {
1404    if (!settings.hasOwnProperty('extlink')) {
1405      return;
1406    }
1407
1408    // Strip the host name down, removing ports, subdomains, or www.
1409    var pattern = /^(([^\/:]+?\.)*)([^\.:]{1,})((\.[a-z0-9]{1,253})*)(:[0-9]{1,5})?$/;
1410    var host = window.location.host.replace(pattern, '$2$3$6');
1411    var subdomain = window.location.host.replace(host, '');
1412
1413    // Determine what subdomains are considered internal.
1414    var subdomains;
1415    if (settings.extlink.extSubdomains) {
1416      subdomains = '([^/]*\\.)?';
1417    }
1418    else if (subdomain === 'www.' || subdomain === '') {
1419      subdomains = '(www\\.)?';
1420    }
1421    else {
1422      subdomains = subdomain.replace('.', '\\.');
1423    }
1424
1425    // Build regular expressions that define an internal link.
1426    var internal_link = new RegExp('^https?://([^@]*@)?' + subdomains + host, 'i');
1427
1428    // Extra internal link matching.
1429    var extInclude = false;
1430    if (settings.extlink.extInclude) {
1431      extInclude = new RegExp(settings.extlink.extInclude.replace(/\\/, '\\'), 'i');
1432    }
1433
1434    // Extra external link matching.
1435    var extExclude = false;
1436    if (settings.extlink.extExclude) {
1437      extExclude = new RegExp(settings.extlink.extExclude.replace(/\\/, '\\'), 'i');
1438    }
1439
1440    // Extra external link CSS selector exclusion.
1441    var extCssExclude = false;
1442    if (settings.extlink.extCssExclude) {
1443      extCssExclude = settings.extlink.extCssExclude;
1444    }
1445
1446    // Extra external link CSS selector explicit.
1447    var extCssExplicit = false;
1448    if (settings.extlink.extCssExplicit) {
1449      extCssExplicit = settings.extlink.extCssExplicit;
1450    }
1451
1452    // Define the jQuery method (either 'append' or 'prepend') of placing the icon, defaults to 'append'.
1453    var extIconPlacement = settings.extlink.extIconPlacement || 'append';
1454
1455    // Find all links which are NOT internal and begin with http as opposed
1456    // to ftp://, javascript:, etc. other kinds of links.
1457    // When operating on the 'this' variable, the host has been appended to
1458    // all links by the browser, even local ones.
1459    // In jQuery 1.1 and higher, we'd use a filter method here, but it is not
1460    // available in jQuery 1.0 (Drupal 5 default).
1461    var external_links = [];
1462    var mailto_links = [];
1463    $('a:not([data-extlink]), area:not([data-extlink])', context).each(function (el) {
1464      try {
1465        var url = '';
1466        if (typeof this.href == 'string') {
1467          url = this.href.toLowerCase();
1468        }
1469        // Handle SVG links (xlink:href).
1470        else if (typeof this.href == 'object') {
1471          url = this.href.baseVal;
1472        }
1473        if (url.indexOf('http') === 0
1474          && ((!url.match(internal_link) && !(extExclude && url.match(extExclude))) || (extInclude && url.match(extInclude)))
1475          && !(extCssExclude && $(this).is(extCssExclude))
1476          && !(extCssExclude && $(this).parents(extCssExclude).length > 0)
1477          && !(extCssExplicit && $(this).parents(extCssExplicit).length < 1)) {
1478          external_links.push(this);
1479        }
1480        // Do not include area tags with begin with mailto: (this prohibits
1481        // icons from being added to image-maps).
1482        else if (this.tagName !== 'AREA'
1483          && url.indexOf('mailto:') === 0
1484          && !(extCssExclude && $(this).parents(extCssExclude).length > 0)
1485          && !(extCssExplicit && $(this).parents(extCssExplicit).length < 1)) {
1486          mailto_links.push(this);
1487        }
1488      }
1489      // IE7 throws errors often when dealing with irregular links, such as:
1490      // <a href="node/10"></a> Empty tags.
1491      // <a href="http://user:[email protected]">example</a> User:pass syntax.
1492      catch (error) {
1493        return false;
1494      }
1495    });
1496
1497    if (settings.extlink.extClass) {
1498      Drupal.extlink.applyClassAndSpan(external_links, settings.extlink.extClass, extIconPlacement);
1499    }
1500
1501    if (settings.extlink.mailtoClass) {
1502      Drupal.extlink.applyClassAndSpan(mailto_links, settings.extlink.mailtoClass, extIconPlacement);
1503    }
1504
1505    if (settings.extlink.extTarget) {
1506      // Apply the target attribute to all links.
1507      $(external_links).attr('target', settings.extlink.extTarget);
1508      // Add rel attributes noopener and noreferrer.
1509      $(external_links).attr('rel', function (i, val) {
1510        // If no rel attribute is present, create one with the values noopener and noreferrer.
1511        if (val == null) {
1512          return 'noopener noreferrer';
1513        }
1514        // Check to see if rel contains noopener or noreferrer. Add what doesn't exist.
1515        if (val.indexOf('noopener') > -1 || val.indexOf('noreferrer') > -1) {
1516          if (val.indexOf('noopener') === -1) {
1517            return val + ' noopener';
1518          }
1519          if (val.indexOf('noreferrer') === -1) {
1520            return val + ' noreferrer';
1521          }
1522          // Both noopener and noreferrer exist. Nothing needs to be added.
1523          else {
1524            return val;
1525          }
1526        }
1527        // Else, append noopener and noreferrer to val.
1528        else {
1529          return val + ' noopener noreferrer';
1530        }
1531      });
1532    }
1533
1534    Drupal.extlink = Drupal.extlink || {};
1535
1536    // Set up default click function for the external links popup. This should be
1537    // overridden by modules wanting to alter the popup.
1538    Drupal.extlink.popupClickHandler = Drupal.extlink.popupClickHandler || function () {
1539      if (settings.extlink.extAlert) {
1540        return confirm(settings.extlink.extAlertText);
1541      }
1542    };
1543
1544    $(external_links).click(function (e) {
1545      return Drupal.extlink.popupClickHandler(e, this);
1546    });
1547  };
1548
1549  /**
1550   * Apply a class and a trailing <span> to all links not containing images.
1551   *
1552   * @param {object[]} links
1553   *   An array of DOM elements representing the links.
1554   * @param {string} class_name
1555   *   The class to apply to the links.
1556   * @param {string} icon_placement
1557   *   'append' or 'prepend' the icon to the link.
1558   */
1559  Drupal.extlink.applyClassAndSpan = function (links, class_name, icon_placement) {
1560    var $links_to_process;
1561    if (Drupal.settings.extlink.extImgClass) {
1562      $links_to_process = $(links);
1563    }
1564    else {
1565      var links_with_images = $(links).find('img').parents('a');
1566      $links_to_process = $(links).not(links_with_images);
1567    }
1568    // Add data-extlink attribute.
1569    $links_to_process.attr('data-extlink', '');
1570    var i;
1571    var length = $links_to_process.length;
1572    for (i = 0; i < length; i++) {
1573      var $link = $($links_to_process[i]);
1574      if ($link.css('display') === 'inline' || $link.css('display') === 'inline-block') {
1575        if (Drupal.settings.extlink.extUseFontAwesome) {
1576          if (class_name === Drupal.settings.extlink.mailtoClass) {
1577            $link[icon_placement]('<span class="fa-' + class_name + ' extlink"><span class="fa fa-envelope-o" title="' + Drupal.settings.extlink.mailtoLabel + '"></span><span class="element-invisible">' + Drupal.settings.extlink.mailtoLabel + '</span></span>');
1578          }
1579          else {
1580            $link[icon_placement]('<span class="fa-' + class_name + ' extlink"><span class="fa fa-external-link" title="' + Drupal.settings.extlink.extLabel + '"></span><span class="element-invisible">' + Drupal.settings.extlink.extLabel + '</span></span>');
1581          }
1582        }
1583        else {
1584          if (class_name === Drupal.settings.extlink.mailtoClass) {
1585            $link[icon_placement]('<span class="' + class_name + '"><span class="element-invisible">' + Drupal.settings.extlink.mailtoLabel + '</span></span>');
1586          }
1587          else {
1588            $link[icon_placement]('<span class="' + class_name + '"><span class="element-invisible">' + Drupal.settings.extlink.extLabel + '</span></span>');
1589          }
1590        }
1591      }
1592    }
1593  };
1594
1595  Drupal.behaviors.extlink = Drupal.behaviors.extlink || {};
1596  Drupal.behaviors.extlink.attach = function (context, settings) {
1597    // Backwards compatibility, for the benefit of modules overriding extlink
1598    // functionality by defining an "extlinkAttach" global function.
1599    if (typeof extlinkAttach === 'function') {
1600      extlinkAttach(context);
1601    }
1602    else {
1603      Drupal.extlink.attach(context, settings);
1604    }
1605  };
1606
1607})(jQuery);
1608;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.