2016-12-19 22:03:50 +01:00
! function ( t ) { function e ( a ) { if ( n [ a ] ) return n [ a ] . exports
var i = n [ a ] = { exports : { } , id : a , loaded : ! 1 }
return t [ a ] . call ( i . exports , i , i . exports , e ) , i . loaded = ! 0 , i . exports } var n = { }
2016-09-22 04:39:02 +02:00
return e . m = t , e . c = n , e . p = "" , e ( 0 ) } ( [ function ( t , e , n ) { "use strict"
n ( 3 ) , n ( 4 ) , n ( 6 ) , n ( 7 ) , n ( 8 ) , n ( 9 ) , n ( 10 ) , n ( 11 ) } , , function ( t , e ) { t . exports = jQuery } , function ( t , e , n ) { "use strict"
2016-12-19 22:03:50 +01:00
function a ( t ) { return t && t . _ _esModule ? t : { "default" : t } } var i = n ( 2 ) , s = a ( i )
2016-12-01 05:38:06 +01:00
s [ "default" ] . entwine ( "ss" , function ( t ) { t ( ".cms-add-form .parent-mode :input" ) . entwine ( { onclick : function e ( t ) { if ( "top" == this . val ( ) ) { var e = this . closest ( "form" ) . find ( "#Form_AddForm_ParentID_Holder .TreeDropdownField" )
2016-09-22 04:39:02 +02:00
e . setValue ( "" ) , e . setTitle ( "" ) } } } ) , t ( ".cms-add-form" ) . entwine ( { ParentID : 0 , ParentCache : { } , onadd : function n ( ) { var t = this
this . find ( "#Form_AddForm_ParentID_Holder .TreeDropdownField" ) . bind ( "change" , function ( ) { t . updateTypeList ( ) } ) , this . find ( ".SelectionGroup.parent-mode" ) . bind ( "change" , function ( ) { t . updateTypeList ( ) } ) , this . updateTypeList ( )
2016-12-19 22:03:50 +01:00
} , loadCachedChildren : function a ( t ) { var e = this . getParentCache ( )
return "undefined" != typeof e [ t ] ? e [ t ] : null } , saveCachedChildren : function i ( t , e ) { var n = this . getParentCache ( )
n [ t ] = e , this . setParentCache ( n ) } , updateTypeList : function s ( ) { var e = this . data ( "hints" ) , n = this . find ( "#Form_AddForm_ParentID_Holder .TreeDropdownField" ) , a = this . find ( "input[name=ParentModeField]:checked" ) . val ( ) , i = n . data ( "metadata" ) , s = i && "child" === a ? n . getValue ( ) || this . getParentID ( ) : null , r = i ? i . ClassName : null , o = r && "child" === a && s ? r : "Root" , d = "undefined" != typeof e [ o ] ? e [ o ] : null , l = this , c = d && "undefined" != typeof d . defaultChild ? d . defaultChild : null , u = [ ]
2016-09-22 04:39:02 +02:00
2016-12-01 05:38:06 +01:00
if ( s ) { if ( this . hasClass ( "loading" ) ) return
return this . addClass ( "loading" ) , this . setParentID ( s ) , n . getValue ( ) || n . setValue ( s ) , u = this . loadCachedChildren ( s ) , null !== u ? ( this . updateSelectionFilter ( u , c ) , void this . removeClass ( "loading" ) ) : ( t . ajax ( { url : l . data ( "childfilter" ) ,
data : { ParentID : s } , success : function h ( t ) { l . saveCachedChildren ( s , t ) , l . updateSelectionFilter ( t , c ) } , complete : function f ( ) { l . removeClass ( "loading" ) } } ) , ! 1 ) } u = d && "undefined" != typeof d . disallowedChildren ? d . disallowedChildren : [ ] ,
2016-12-19 22:03:50 +01:00
this . updateSelectionFilter ( u , c ) } , updateSelectionFilter : function r ( e , n ) { var a = null
if ( this . find ( "#Form_AddForm_PageType div.radio" ) . each ( function ( ) { var n = t ( this ) . find ( "input" ) . val ( ) , i = t . inArray ( n , e ) === - 1
t ( this ) . setEnabled ( i ) , i || t ( this ) . setSelected ( ! 1 ) , a = null === a ? i : a && i } ) , n ) var i = this . find ( "#Form_AddForm_PageType div.radio input[value=" + n + "]" ) . parents ( "li:first" )
else var i = this . find ( "#Form_AddForm_PageType div.radio:not(.disabled):first" )
i . setSelected ( ! 0 ) , i . siblings ( ) . setSelected ( ! 1 ) , this . find ( "#Form_AddForm_PageType div.radio:not(.disabled)" ) . length ? this . find ( "button[name=action_doAdd]" ) . removeAttr ( "disabled" ) : this . find ( "button[name=action_doAdd]" ) . addAttr ( "disabled" ) ,
this . find ( ".message-restricted" ) [ a ? "hide" : "show" ] ( ) } } ) , t ( ".cms-add-form #Form_AddForm_PageType div.radio" ) . entwine ( { onclick : function o ( t ) { this . setSelected ( ! 0 ) } , setSelected : function d ( t ) { var e = this . find ( "input" )
2016-12-01 05:38:06 +01:00
2016-09-22 04:39:02 +02:00
t && ! e . is ( ":disabled" ) ? ( this . siblings ( ) . setSelected ( ! 1 ) , this . toggleClass ( "selected" , ! 0 ) , e . prop ( "checked" , ! 0 ) ) : ( this . toggleClass ( "selected" , ! 1 ) , e . prop ( "checked" , ! 1 ) ) } , setEnabled : function l ( e ) { t ( this ) . toggleClass ( "disabled" , ! e ) ,
2016-12-19 22:03:50 +01:00
e ? t ( this ) . find ( "input" ) . removeAttr ( "disabled" ) : t ( this ) . find ( "input" ) . attr ( "disabled" , "disabled" ) . removeAttr ( "checked" ) } } ) , t ( ".cms-content-addpage-button" ) . entwine ( { onclick : function c ( e ) { var n = t ( ".cms-tree" ) , a = t ( ".cms-list" ) , i = 0 , s
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
if ( n . is ( ":visible" ) ) { var r = n . jstree ( "get_selected" )
i = r ? t ( r [ 0 ] ) . data ( "id" ) : null } else { var o = a . find ( 'input[name="Page[GridState]"]' ) . val ( )
o && ( i = parseInt ( JSON . parse ( o ) . ParentID , 10 ) ) } var d = { selector : this . data ( "targetPanel" ) , pjax : this . data ( "pjax" ) } , l
i ? ( s = this . data ( "extraParams" ) ? this . data ( "extraParams" ) : "" , l = t . path . addSearchParams ( i18n . sprintf ( this . data ( "urlAddpage" ) , i ) , s ) ) : l = this . attr ( "href" ) , t ( ".cms-container" ) . loadPanel ( l , null , d ) , e . preventDefault ( ) ,
2016-09-22 04:39:02 +02:00
this . blur ( ) } } ) } ) } , function ( t , e , n ) { "use strict"
2016-12-19 22:03:50 +01:00
function a ( t ) { return t && t . _ _esModule ? t : { "default" : t } } var i = n ( 2 ) , s = a ( i ) , r = n ( 5 ) , o = a ( r )
s [ "default" ] . entwine ( "ss" , function ( t ) { t ( ".cms-edit-form :input[name=ClassName]" ) . entwine ( { onchange : function e ( ) { alert ( o [ "default" ] . _t ( "CMSMAIN.ALERTCLASSNAME" ) ) } } ) , t ( ".cms-edit-form input[name=Title]" ) . entwine ( {
2016-09-22 04:39:02 +02:00
onmatch : function n ( ) { var e = this
e . data ( "OrigVal" , e . val ( ) )
2016-12-19 22:03:50 +01:00
var n = e . closest ( "form" ) , a = t ( "input:text[name=URLSegment]" , n ) , i = t ( "input[name=LiveLink]" , n )
a . length > 0 && ( e . _addActions ( ) , this . bind ( "change" , function ( n ) { var s = e . data ( "OrigVal" ) , r = e . val ( )
e . data ( "OrigVal" , r ) , 0 === a . val ( ) . indexOf ( a . data ( "defaultUrl" ) ) && "" == i . val ( ) ? e . updateURLSegment ( r ) : t ( ".update" , e . parent ( ) ) . show ( ) , e . updateRelatedFields ( r , s ) , e . updateBreadcrumbLabel ( r ) } ) ) , this . _super ( ) } , onunmatch : function a ( ) {
this . _super ( ) } , updateRelatedFields : function i ( e , n ) { this . parents ( "form" ) . find ( "input[name=MetaTitle], input[name=MenuTitle]" ) . each ( function ( ) { var a = t ( this )
a . val ( ) == n && ( a . val ( e ) , a . updatedRelatedFields && a . updatedRelatedFields ( ) ) } ) } , updateURLSegment : function s ( e ) { var n = t ( "input:text[name=URLSegment]" , this . closest ( "form" ) ) , a = n . closest ( ".field.urlsegment" ) , i = t ( ".update" , this . parent ( ) )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
a . update ( e ) , i . is ( ":visible" ) && i . hide ( ) } , updateBreadcrumbLabel : function r ( e ) { var n = t ( ".cms-edit-form input[name=ID]" ) . val ( ) , a = t ( "span.cms-panel-link.crumb" )
e && "" != e && a . text ( e ) } , _addActions : function d ( ) { var e = this , n
n = t ( "<button />" , { "class" : "update ss-ui-button-small" , text : o [ "default" ] . _t ( "URLSEGMENT.UpdateURL" ) , type : "button" , click : function a ( t ) { t . preventDefault ( ) , e . updateURLSegment ( e . val ( ) ) } } ) , n . insertAfter ( e ) , n . hide ( )
2016-09-22 04:39:02 +02:00
} } ) , t ( ".cms-edit-form .parentTypeSelector" ) . entwine ( { onmatch : function l ( ) { var t = this
this . find ( ":input[name=ParentType]" ) . bind ( "click" , function ( e ) { t . _toggleSelection ( e ) } ) , this . find ( ".TreeDropdownField" ) . bind ( "change" , function ( e ) { t . _changeParentId ( e ) } ) , this . _changeParentId ( ) , this . _toggleSelection ( ) ,
2016-12-19 22:03:50 +01:00
this . _super ( ) } , onunmatch : function c ( ) { this . _super ( ) } , _toggleSelection : function u ( e ) { var n = this . find ( ":input[name=ParentType]:checked" ) . val ( ) , a = this . find ( "#Form_EditForm_ParentID_Holder" )
"root" == n ? this . find ( ":input[name=ParentID]" ) . val ( 0 ) : this . find ( ":input[name=ParentID]" ) . val ( this . find ( "#Form_EditForm_ParentType_subpage" ) . data ( "parentIdValue" ) ) , "root" != n ? a . slideDown ( 400 , function ( ) { t ( this ) . css ( "overflow" , "visible" )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
} ) : a . slideUp ( ) } , _changeParentId : function h ( t ) { var e = this . find ( ":input[name=ParentID]" ) . val ( )
2016-09-22 04:39:02 +02:00
this . find ( "#Form_EditForm_ParentType_subpage" ) . data ( "parentIdValue" , e ) } } ) , t ( ".cms-edit-form #CanViewType, .cms-edit-form #CanEditType, .cms-edit-form #CanCreateTopLevelType" ) . entwine ( { onmatch : function f ( ) {
var e
"CanViewType" == this . attr ( "id" ) ? e = t ( "#Form_EditForm_ViewerGroups_Holder" ) : "CanEditType" == this . attr ( "id" ) ? e = t ( "#Form_EditForm_EditorGroups_Holder" ) : "CanCreateTopLevelType" == this . attr ( "id" ) && ( e = t ( "#Form_EditForm_CreateTopLevelGroups_Holder" ) ) ,
2016-12-19 22:03:50 +01:00
this . find ( ".optionset :input" ) . bind ( "change" , function ( n ) { var a = t ( this ) . closest ( ".middleColumn" ) . parent ( "div" )
"OnlyTheseUsers" == n . target . value ? ( a . addClass ( "remove-splitter" ) , e . show ( ) ) : ( a . removeClass ( "remove-splitter" ) , e . hide ( ) ) } )
2016-09-22 04:39:02 +02:00
var n = this . find ( "input[name=" + this . attr ( "id" ) + "]:checked" ) . val ( )
e [ "OnlyTheseUsers" == n ? "show" : "hide" ] ( ) , this . _super ( ) } , onunmatch : function m ( ) { this . _super ( ) } } ) , t ( ".cms-edit-form .btn-toolbar #Form_EditForm_action_print" ) . entwine ( { onclick : function p ( e ) { var n = t ( this [ 0 ] . form ) . attr ( "action" ) . replace ( /\?.*$/ , "" ) + "/printable/" + t ( ":input[name=ID]" , this [ 0 ] . form ) . val ( )
2016-12-19 22:03:50 +01:00
return "http://" != n . substr ( 0 , 7 ) && ( n = t ( "base" ) . attr ( "href" ) + n ) , window . open ( n , "printable" ) , ! 1 } } ) , t ( ".cms-edit-form .btn-toolbar #Form_EditForm_action_rollback" ) . entwine ( { onclick : function v ( t ) { var e = this . parents ( "form:first" ) , n = e . find ( ":input[name=Version]" ) . val ( ) , a = ""
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
return a = n ? o [ "default" ] . sprintf ( o [ "default" ] . _t ( "CMSMain.RollbackToVersion" ) , n ) : o [ "default" ] . _t ( "CMSMain.ConfirmRestoreFromLive" ) , ! ! confirm ( a ) && this . _super ( t ) } } ) , t ( ".cms-edit-form .btn-toolbar #Form_EditForm_action_archive" ) . entwine ( {
onclick : function g ( t ) { var e = this . parents ( "form:first" ) , n = e . find ( ":input[name=Version]" ) . val ( ) , a = ""
return a = o [ "default" ] . sprintf ( o [ "default" ] . _t ( "CMSMain.Archive" ) , n ) , ! ! confirm ( a ) && this . _super ( t ) } } ) , t ( ".cms-edit-form .btn-toolbar #Form_EditForm_action_restore" ) . entwine ( { onclick : function _ ( t ) { var e = this . parents ( "form:first" ) , n = e . find ( ":input[name=Version]" ) . val ( ) , a = "" , i = this . data ( "toRoot" )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
return a = o [ "default" ] . sprintf ( o [ "default" ] . _t ( i ? "CMSMain.RestoreToRoot" : "CMSMain.Restore" ) , n ) , ! ! confirm ( a ) && this . _super ( t ) } } ) , t ( ".cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish" ) . entwine ( { onclick : function b ( t ) {
var e = this . parents ( "form:first" ) , n = e . find ( ":input[name=Version]" ) . val ( ) , a = ""
return a = o [ "default" ] . sprintf ( o [ "default" ] . _t ( "CMSMain.Unpublish" ) , n ) , ! ! confirm ( a ) && this . _super ( t ) } } ) , t ( ".cms-edit-form.changed" ) . entwine ( { onmatch : function w ( t ) { var e = this . find ( "button[name=action_save]" )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
e . attr ( "data-text-alternate" ) && ( e . attr ( "data-text-standard" , e . text ( ) ) , e . text ( e . attr ( "data-text-alternate" ) ) ) , e . attr ( "data-btn-alternate" ) && ( e . attr ( "data-btn-standard" , e . attr ( "class" ) ) , e . attr ( "class" , e . attr ( "data-btn-alternate" ) ) ) ,
e . removeClass ( "btn-secondary-outline" ) . addClass ( "btn-primary" )
2016-12-01 05:38:06 +01:00
var n = this . find ( "button[name=action_publish]" )
2016-12-19 22:03:50 +01:00
n . attr ( "data-text-alternate" ) && ( n . attr ( "data-text-standard" , n . attr ( "data-text-alternate" ) ) , n . text ( n . attr ( "data-text-alternate" ) ) ) , n . attr ( "data-btn-alternate" ) && ( n . attr ( "data-btn-standard" , n . attr ( "class" ) ) ,
n . attr ( "class" , n . attr ( "data-btn-alternate" ) ) ) , n . removeClass ( "btn-secondary-outline" ) . addClass ( "btn-primary" ) , this . _super ( t ) } , onunmatch : function C ( t ) { var e = this . find ( "button[name=action_save]" )
e . attr ( "data-text-standard" ) && e . text ( e . attr ( "data-text-standard" ) ) , e . attr ( "data-btn-standard" ) && e . attr ( "class" , e . attr ( "data-btn-standard" ) )
2016-12-01 05:38:06 +01:00
var n = this . find ( "button[name=action_publish]" )
2016-12-19 22:03:50 +01:00
n . attr ( "data-text-standard" ) && n . text ( n . attr ( "data-text-standard" ) ) , n . attr ( "data-btn-standard" ) && n . attr ( "class" , n . attr ( "data-btn-standard" ) ) , this . _super ( t ) } } ) , t ( ".cms-edit-form .btn-toolbar button[name=action_publish]" ) . entwine ( {
2016-12-01 05:38:06 +01:00
onbuttonafterrefreshalternate : function F ( ) { this . data ( "showingAlternate" ) ? ( this . addClass ( "btn-primary" ) , this . removeClass ( "btn-secondary" ) ) : ( this . removeClass ( "btn-primary" ) , this . addClass ( "btn-secondary" ) )
2016-09-22 04:39:02 +02:00
2016-12-01 05:38:06 +01:00
} } ) , t ( ".cms-edit-form .btn-toolbar button[name=action_save]" ) . entwine ( { onbuttonafterrefreshalternate : function x ( ) { this . data ( "showingAlternate" ) ? ( this . addClass ( "btn-primary" ) , this . removeClass ( "btn-secondary" ) ) : ( this . removeClass ( "btn-primary" ) ,
this . addClass ( "btn-secondary" ) ) } } ) , t ( '.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked' ) . entwine ( { onmatch : function P ( ) { this . redraw ( ) , this . _super ( ) } , onunmatch : function T ( ) { this . _super ( )
2016-09-22 04:39:02 +02:00
2016-12-01 05:38:06 +01:00
} , redraw : function y ( ) { var e = t ( ".cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder" )
"Form_EditForm_ParentType_root" == t ( this ) . attr ( "id" ) ? e . slideUp ( ) : e . slideDown ( ) } , onclick : function S ( ) { this . redraw ( ) } } ) , "Form_EditForm_ParentType_root" == t ( '.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked' ) . attr ( "id" ) && t ( ".cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder" ) . hide ( )
2016-09-22 04:39:02 +02:00
} ) } , function ( t , e ) { t . exports = i18n } , function ( t , e , n ) { "use strict"
2016-12-19 22:03:50 +01:00
function a ( t ) { return t && t . _ _esModule ? t : { "default" : t } } var i = n ( 2 ) , s = a ( i )
2016-12-01 05:38:06 +01:00
s [ "default" ] . entwine ( "ss" , function ( t ) { t ( ".cms-content-header-info" ) . entwine ( { "from .cms-panel" : { ontoggle : function e ( t ) { var e = this . closest ( ".cms-content" ) . find ( t . target )
2016-10-26 03:01:13 +02:00
0 !== e . length && this . parent ( ) [ e . hasClass ( "collapsed" ) ? "addClass" : "removeClass" ] ( "collapsed" ) } } } ) , t ( ".cms .cms-panel-link.page-view-link" ) . entwine ( { onclick : function n ( e ) { this . siblings ( ) . removeClass ( "active" ) ,
this . addClass ( "active" )
var n = t ( ".cms-content-filters input[type='hidden'][name='view']" )
2016-12-19 22:03:50 +01:00
return n . val ( t ( this ) . data ( "view" ) ) , this . _super ( e ) } } ) , t ( ".cms-content-toolbar" ) . entwine ( { onmatch : function a ( ) { var e = this
this . _super ( ) , t . each ( this . find ( ".cms-actions-buttons-row .tool-button" ) , function ( ) { var n = t ( this ) , a = n . data ( "toolid" ) , i = n . hasClass ( "active" )
void 0 !== a && ( n . data ( "active" , ! 1 ) . removeClass ( "active" ) , t ( "#" + a ) . hide ( ) , e . bindActionButtonEvents ( n ) ) } ) } , onunmatch : function i ( ) { var e = this
2016-09-22 04:39:02 +02:00
this . _super ( ) , t . each ( this . find ( ".cms-actions-buttons-row .tool-button" ) , function ( ) { var n = t ( this )
2016-12-01 05:38:06 +01:00
e . unbindActionButtonEvents ( n ) } ) } , bindActionButtonEvents : function s ( t ) { var e = this
2016-12-19 22:03:50 +01:00
t . on ( "click.cmsContentToolbar" , function ( n ) { e . showHideTool ( t ) } ) } , unbindActionButtonEvents : function r ( t ) { t . off ( ".cmsContentToolbar" ) } , showHideTool : function o ( e ) { var n = e . data ( "active" ) , a = e . data ( "toolid" ) , i = t ( "#" + a )
2016-09-22 04:39:02 +02:00
t . each ( this . find ( ".cms-actions-buttons-row .tool-button" ) , function ( ) { var e = t ( this ) , n = t ( "#" + e . data ( "toolid" ) )
2016-12-19 22:03:50 +01:00
e . data ( "toolid" ) !== a && ( n . hide ( ) , e . data ( "active" , ! 1 ) ) } ) , e [ n ? "removeClass" : "addClass" ] ( "active" ) , i [ n ? "hide" : "show" ] ( ) , e . data ( "active" , ! n ) } } ) } ) } , function ( t , e , n ) { "use strict"
function a ( t ) { return t && t . _ _esModule ? t : { "default" : t } } var i = n ( 2 ) , s = a ( i ) , r = n ( 5 ) , o = a ( r )
2016-12-01 05:38:06 +01:00
s [ "default" ] . entwine ( "ss.tree" , function ( t ) { t ( ".cms-tree" ) . entwine ( { fromDocument : { "oncontext_show.vakata" : function e ( t ) { this . adjustContextClass ( ) } } , adjustContextClass : function n ( ) { var e = t ( "#vakata-contextmenu" ) . find ( "ul ul" )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
e . each ( function ( n ) { var a = "1" , i = t ( e [ n ] ) . find ( "li" ) . length
i > 20 ? a = "3" : i > 10 && ( a = "2" ) , t ( e [ n ] ) . addClass ( "col-" + a ) . removeClass ( "right" ) , t ( e [ n ] ) . find ( "li" ) . on ( "mouseenter" , function ( e ) { t ( this ) . parent ( "ul" ) . removeClass ( "right" ) } ) } ) } , getTreeConfig : function a ( ) { var e = this , n = this . _super ( ) , a = this . getHints ( )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
return n . plugins . push ( "contextmenu" ) , n . contextmenu = { items : function i ( n ) { var a = { edit : { label : n . hasClass ( "edit-disabled" ) ? o [ "default" ] . _t ( "Tree.EditPage" , "Edit page" , 100 , "Used in the context menu when right-clicking on a page node in the CMS tree" ) : o [ "default" ] . _t ( "Tree.ViewPage" , "View page" , 100 , "Used in the context menu when right-clicking on a page node in the CMS tree" ) ,
action : function c ( n ) { t ( ".cms-container" ) . entwine ( ".ss" ) . loadPanel ( o [ "default" ] . sprintf ( e . data ( "urlEditpage" ) , n . data ( "id" ) ) ) } } }
n . hasClass ( "nochildren" ) || ( a . showaslist = { label : o [ "default" ] . _t ( "Tree.ShowAsList" ) , action : function u ( n ) { t ( ".cms-container" ) . entwine ( ".ss" ) . loadPanel ( e . data ( "urlListview" ) + "&ParentID=" + n . data ( "id" ) , null , {
2016-09-22 04:39:02 +02:00
tabState : { "pages-controller-cms-content" : { tabSelector : ".content-listview" } } } ) } } )
2016-12-19 22:03:50 +01:00
var i = n . data ( "pagetype" ) , s = n . data ( "id" ) , r = n . find ( ">a .item" ) . data ( "allowedchildren" ) , d = { } , l = ! 1
return t . each ( r , function ( n , a ) { l = ! 0 , d [ "allowedchildren-" + n ] = { label : '<span class="jstree-pageicon"></span>' + a , _class : "class-" + n , action : function i ( a ) { t ( ".cms-container" ) . entwine ( ".ss" ) . loadPanel ( t . path . addSearchParams ( o [ "default" ] . sprintf ( e . data ( "urlAddpage" ) , s , n ) , e . data ( "extraParams" ) ) )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
} } } ) , l && ( a . addsubpage = { label : o [ "default" ] . _t ( "Tree.AddSubPage" , "Add page under this page" , 100 , "Used in the context menu when right-clicking on a page node in the CMS tree" ) , submenu : d } ) , n . hasClass ( "edit-disabled" ) || ( a . duplicate = {
label : o [ "default" ] . _t ( "Tree.Duplicate" ) , submenu : [ { label : o [ "default" ] . _t ( "Tree.ThisPageOnly" ) , action : function h ( n ) { t ( ".cms-container" ) . entwine ( ".ss" ) . loadPanel ( t . path . addSearchParams ( o [ "default" ] . sprintf ( e . data ( "urlDuplicate" ) , n . data ( "id" ) ) , e . data ( "extraParams" ) ) )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
} } , { label : o [ "default" ] . _t ( "Tree.ThisPageAndSubpages" ) , action : function f ( n ) { t ( ".cms-container" ) . entwine ( ".ss" ) . loadPanel ( t . path . addSearchParams ( o [ "default" ] . sprintf ( e . data ( "urlDuplicatewithchildren" ) , n . data ( "id" ) ) , e . data ( "extraParams" ) ) )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
} } ] } ) , a } } , n } } ) , t ( ".cms-tree a.jstree-clicked" ) . entwine ( { onmatch : function i ( ) { var t = this , e = t . parents ( ".cms-panel-content" ) , n ; ( t . offset ( ) . top < 0 || t . offset ( ) . top > e . height ( ) - t . height ( ) ) && ( n = e . scrollTop ( ) + t . offset ( ) . top + e . height ( ) / 2 ,
2016-12-01 05:38:06 +01:00
e . animate ( { scrollTop : n } , "slow" ) ) } } ) , t ( ".cms-tree-filtered .clear-filter" ) . entwine ( { onclick : function s ( ) { window . location = location . protocol + "//" + location . host + location . pathname } } ) } ) } , function ( t , e , n ) { "use strict"
2016-10-21 03:08:42 +02:00
2016-12-19 22:03:50 +01:00
function a ( t ) { return t && t . _ _esModule ? t : { "default" : t } } var i = n ( 2 ) , s = a ( i ) , r = n ( 5 ) , o = a ( r )
s [ "default" ] . entwine ( "ss" , function ( t ) { t ( "#Form_VersionsForm" ) . entwine ( { onmatch : function e ( ) { this . _super ( ) } , onunmatch : function n ( ) { this . _super ( ) } , onsubmit : function a ( e , n ) { e . preventDefault ( )
var a , i = this
if ( a = this . find ( ":input[name=ID]" ) . val ( ) , ! a ) return ! 1
var s , r , d , l , c , u , h
2016-09-22 04:39:02 +02:00
if ( u = this . find ( ":input[name=CompareMode]" ) . is ( ":checked" ) , d = this . find ( "table input[type=checkbox]" ) . filter ( ":checked" ) , u ) { if ( 2 != d . length ) return ! 1
2016-12-19 22:03:50 +01:00
l = d . eq ( 0 ) . val ( ) , c = d . eq ( 1 ) . val ( ) , s = this . find ( ":submit[name=action_doCompare]" ) , r = o [ "default" ] . sprintf ( this . data ( "linkTmplCompare" ) , a , c , l ) } else l = d . eq ( 0 ) . val ( ) , s = this . find ( ":submit[name=action_doShowVersion]" ) ,
r = o [ "default" ] . sprintf ( this . data ( "linkTmplShow" ) , a , l )
t ( ".cms-container" ) . loadPanel ( r , "" , { pjax : "CurrentForm" } ) } } ) , t ( "#Form_VersionsForm input[name=ShowUnpublished]" ) . entwine ( { onmatch : function i ( ) { this . toggle ( ) , this . _super ( ) } , onunmatch : function s ( ) { this . _super ( )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
} , onchange : function r ( ) { this . toggle ( ) } , toggle : function d ( ) { var e = t ( this ) , n = e . parents ( "form" )
2016-10-05 22:05:35 +02:00
e . attr ( "checked" ) ? n . find ( "tr[data-published=false]" ) . css ( "display" , "" ) : n . find ( "tr[data-published=false]" ) . css ( "display" , "none" ) . _unselect ( ) } } ) , t ( "#Form_VersionsForm tbody tr" ) . entwine ( { onclick : function l ( t ) {
var e , n
2016-12-19 22:03:50 +01:00
return e = this . parents ( "form" ) . find ( ":input[name=CompareMode]" ) . attr ( "checked" ) , n = this . siblings ( ".active" ) , e && this . hasClass ( "active" ) ? void this . _unselect ( ) : e ? n . length > 1 ? alert ( o [ "default" ] . _t ( "ONLYSELECTTWO" , "You can only compare two versions at this time." ) ) : ( this . _select ( ) ,
2016-09-22 04:39:02 +02:00
void ( 1 == n . length && this . parents ( "form" ) . submit ( ) ) ) : ( this . _select ( ) , n . _unselect ( ) , this . parents ( "form" ) . submit ( ) , void 0 ) } , _unselect : function c ( ) { this . removeClass ( "active" ) , this . find ( ":input[type=checkbox]" ) . attr ( "checked" , ! 1 )
} , _select : function u ( ) { this . addClass ( "active" ) , this . find ( ":input[type=checkbox]" ) . attr ( "checked" , ! 0 ) } } ) } ) } , function ( t , e , n ) { "use strict"
2016-12-19 22:03:50 +01:00
function a ( t ) { return t && t . _ _esModule ? t : { "default" : t } } var i = n ( 2 ) , s = a ( i )
2016-12-01 05:38:06 +01:00
s [ "default" ] . entwine ( "ss" , function ( t ) { t ( "#Form_EditForm_RedirectionType input" ) . entwine ( { onmatch : function e ( ) { var e = t ( this )
2016-12-19 22:03:50 +01:00
e . attr ( "checked" ) && this . toggle ( ) , this . _super ( ) } , onunmatch : function n ( ) { this . _super ( ) } , onclick : function a ( ) { this . toggle ( ) } , toggle : function i ( ) { "Internal" == t ( this ) . attr ( "value" ) ? ( t ( "#Form_EditForm_ExternalURL_Holder" ) . hide ( ) ,
2016-09-22 04:39:02 +02:00
t ( "#Form_EditForm_LinkToID_Holder" ) . show ( ) ) : ( t ( "#Form_EditForm_ExternalURL_Holder" ) . show ( ) , t ( "#Form_EditForm_LinkToID_Holder" ) . hide ( ) ) } } ) } ) } , function ( t , e , n ) { "use strict"
2016-12-19 22:03:50 +01:00
function a ( t ) { return t && t . _ _esModule ? t : { "default" : t } } var i = n ( 2 ) , s = a ( i )
2016-12-01 05:38:06 +01:00
s [ "default" ] . entwine ( "ss" , function ( t ) { t ( ".field.urlsegment:not(.readonly)" ) . entwine ( { MaxPreviewLength : 55 , Ellipsis : "..." , onmatch : function e ( ) { this . find ( ":text" ) . length && this . toggleEdit ( ! 1 ) , this . redraw ( ) ,
2016-09-22 04:39:02 +02:00
this . _super ( ) } , redraw : function n ( ) { var t = this . find ( ":text" ) , e = decodeURI ( t . data ( "prefix" ) + t . val ( ) ) , n = e
2016-12-19 22:03:50 +01:00
e . length > this . getMaxPreviewLength ( ) && ( n = this . getEllipsis ( ) + e . substr ( e . length - this . getMaxPreviewLength ( ) , e . length ) ) , this . find ( ".URL-link" ) . attr ( "href" , encodeURI ( e + t . data ( "suffix" ) ) ) . text ( n ) } , toggleEdit : function a ( t ) {
2016-09-22 04:39:02 +02:00
var e = this . find ( ":text" )
2016-12-19 22:03:50 +01:00
this . find ( ".preview-holder" ) [ t ? "hide" : "show" ] ( ) , this . find ( ".edit-holder" ) [ t ? "show" : "hide" ] ( ) , t && ( e . data ( "origval" , e . val ( ) ) , e . focus ( ) ) } , update : function i ( ) { var t = this , e = this . find ( ":text" ) , n = e . data ( "origval" ) , a = arguments [ 0 ] , i = a && "" !== a ? a : e . val ( )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
n != i ? ( this . addClass ( "loading" ) , this . suggest ( i , function ( n ) { e . val ( decodeURIComponent ( n . value ) ) , t . toggleEdit ( ! 1 ) , t . removeClass ( "loading" ) , t . redraw ( ) } ) ) : ( this . toggleEdit ( ! 1 ) , this . redraw ( ) ) } , cancel : function s ( ) {
2016-09-22 04:39:02 +02:00
var t = this . find ( ":text" )
2016-12-19 22:03:50 +01:00
t . val ( t . data ( "origval" ) ) , this . toggleEdit ( ! 1 ) } , suggest : function r ( e , n ) { var a = this , i = a . find ( ":text" ) , s = t . path . parseUrl ( a . closest ( "form" ) . attr ( "action" ) ) , r = s . hrefNoSearch + "/field/" + i . attr ( "name" ) + "/suggest/?value=" + encodeURIComponent ( e )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
s . search && ( r += "&" + s . search . replace ( /^\?/ , "" ) ) , t . ajax ( { url : r , success : function o ( t ) { n . apply ( this , arguments ) } , error : function d ( t , e ) { t . statusText = t . responseText } , complete : function l ( ) { a . removeClass ( "loading" )
2016-09-22 04:39:02 +02:00
2016-12-19 22:03:50 +01:00
} } ) } } ) , t ( ".field.urlsegment .edit" ) . entwine ( { onclick : function o ( t ) { t . preventDefault ( ) , this . closest ( ".field" ) . toggleEdit ( ! 0 ) } } ) , t ( ".field.urlsegment .update" ) . entwine ( { onclick : function d ( t ) { t . preventDefault ( ) ,
2016-09-22 04:39:02 +02:00
this . closest ( ".field" ) . update ( ) } } ) , t ( ".field.urlsegment .cancel" ) . entwine ( { onclick : function l ( t ) { t . preventDefault ( ) , this . closest ( ".field" ) . cancel ( ) } } ) } ) } , function ( t , e ) { } ] )
2016-09-21 03:07:03 +02:00
//# sourceMappingURL=bundle.js.map