API Use Webpack

The bundle is generated by running “webpack” directly - gulp is no
longer needed as an intermediary. The resulting config is a lot shorter,
although more configuration is pushed into lib.js.

Modules are shared between javascript files as global variables.
Although this global state pollution is a bit messy, I don’t think it’s
practically any worse than the previous state, and it highlights the
heavy coupling between the different packages we have in place.
Reducing the width of the coupling between the core javascript and
add-on modules would probably be a better way of dealing with this than
replacing global variables with some other kind of global state.

The web pack execution seems roughly twice as fast - if I clear out my
framework/client/dist/js folder, it takes 13.3s to rebuild. However,
it’s not rebuilding other files inside dist, only the bundle files.

CSS files are now included from javascript and incorporated into
bundle.css by the webpack. Although the style-loader is helpful in some
dev workflows (it allows live reload), it introduces a flash of
unstyled content which makes it inappropriate for production.

Instead ExtractTextPlugin is used to write all the aggregated CSS
into a single bundle.css file. A style-loader-based configuration could
be introduced for dev environments, if we make use of the webpack live
reloader in the future.

Note that the following features have been removed as they don't appear to be
necessary when using Webpack:
 - UMD module generation
 - thirdparty dist file copying

LeftAndMain.js deps: Without it, ssui.core.js gets loaded too late,
which leads e.g. to buttons being initialised without this added behaviour.
This commit is contained in:
Sam Minnee 2016-08-21 13:17:50 +12:00 committed by Ingo Schommer
parent 4e1d38c209
commit 2e577ddb1d
54 changed files with 499 additions and 5210 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ admin/thirdparty/chosen/node_modules
node_modules/
coverage/
/**/*.js.map
/**/*.css.map

View File

@ -1,3 +1 @@
body{font-family:Arial, san-serif;font-size:13px;line-height:18px;margin-bottom:18px;color:#333;width:940px;margin:0 auto 18px;background-color:#f4f4f4}body p{font-size:13px;line-height:18px;margin-bottom:18px;color:#333}body a{color:#0973A6}body h1,body h2,body h3,body h4,body h5,body h6{color:#222;font-family:inherit;font-weight:bold;margin:0;margin:27px 0 9px;text-rendering:optimizelegibility;clear:both;text-shadow:0 1px 0 #fff}body h1 small,body h2 small,body h3 small,body h4 small,body h5 small,body h6 small{font-weight:normal;font-size:12px;color:#666}body h1{font-size:36px;line-height:36px;letter-spacing:-0.5px}body h1{background:transparent url(../../../admin/images/logo.gif) no-repeat left top;text-indent:-9999px;height:164px;width:161px;float:left;padding-right:40px;border-right:1px solid #B1C0C5;margin-right:40px}body h2{font-size:34px;line-height:36px;letter-spacing:-0.5px}body h3{font-size:18px;line-height:27px}body h4{font-size:14px;line-height:18px;margin:18px 0 9px}body h5{font-size:12px;line-height:18px;margin:18px 0 0}body .clear{clear:both}body .left{float:left}body .message{padding:2px 18px;margin-bottom:18px;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px}body .message p{margin:11px 0 13px}body .message.warning{background-color:#fcf8f2;border:1px #ffc28b solid}body .message.error{background-color:#FDF1F3;border:1px solid #F8C3CD}body .message ul{margin-left:18px;margin-top:-9px}body .helpText{float:right;width:425px;padding-left:20px;color:#666;margin-top:0;background:transparent url(../../../admin/images/question.png) no-repeat left 1px}body .helpText.requirementsHelpText{margin-top:17px}body .typography table{margin:9px 0 27px;border-collapse:collapse;width:100%}body .typography table thead tr td,body .typography table thead tr th{font-weight:bold;vertical-align:bottom;padding:12px}body .typography table th,body .typography table td{padding:8px 12px;text-align:left}body .typography table td{vertical-align:top;border-top:none;background-color:#fff}body .typography table tbody tr:nth-child(odd) td,body .typography table tbody tr:nth-child(odd) th{background-color:#fcfcfc}body .typography table tbody tr:hover td,body .typography table tbody tr:hover th{background-color:#f6f6f6}body .typography table tfoot{font-style:italic;color:#888}body .typography input,body .typography textarea,body .typography select{width:420px;margin-bottom:9px;color:#707070;border:1px solid #ddd;display:inline-block;height:18px;padding:4px 6px;line-height:18px;font-size:13px;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px}body .typography input,body .typography textarea{-webkit-transition:border linear .2s, -webkit-box-shadow linear .2s;transition:border linear .2s, -webkit-box-shadow linear .2s;-o-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s, -webkit-box-shadow linear .2s;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1)}body .typography input:focus,body .typography textarea:focus{outline:0;border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 4px rgba(82,168,236,0.6);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 4px rgba(82,168,236,0.6)}body .typography input[type=file]:focus,body .typography input[type=checkbox]:focus,body .typography select:focus{-webkit-box-shadow:none;box-shadow:none;outline:1px dotted #666}body .typography select{height:26px}body .typography option{line-height:27px;font-size:12px;padding:2px 6px;color:#666}body .typography label{width:auto;float:none;padding-top:0;margin:0 0 5px 0;text-align:left;display:block}body .typography .fields{float:left}body .typography input.action{text-align:center;font-weight:bold;margin:9px 0 27px;padding:6px 8px;width:200px;width:auto;color:#222;border:1px solid #aaa;text-shadow:0 1px 0 #eee;font-size:13px;float:none;height:auto;background:#fbfbfb;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fbfbfb), color-stop(100%, #bbb));background:-webkit-linear-gradient(top, #fbfbfb 0%, #bbb 100%);background:-o-linear-gradient(top, #fbfbfb 0%, #bbb 100%);background:-webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#bbb));background:linear-gradient(to bottom, #fbfbfb 0%, #bbb 100%);-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px;-webkit-box-shadow:0 1px 0 0 #fff;box-shadow:0 1px 0 0 #fff;background-color:#ddd}.lt-ie9 body .typography input.action{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb', endColorstr='#bbb',GradientType=0 )}body .typography input.action:hover{-webkit-box-shadow:0 1px 2px 0 #ccc;box-shadow:0 1px 2px 0 #ccc;background:#fbfbfb;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fbfbfb), color-stop(100%, #ccc));background:-webkit-linear-gradient(top, #fbfbfb 0%, #ccc 100%);background:-o-linear-gradient(top, #fbfbfb 0%, #ccc 100%);background:-webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#ccc));background:linear-gradient(to bottom, #fbfbfb 0%, #ccc 100%)}.lt-ie9 body .typography input.action:hover{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb', endColorstr='#ccc',GradientType=0 )}body .typography input.action:focus,body .typography input.action:active{-webkit-box-shadow:0 1px 0 0 #fff;box-shadow:0 1px 0 0 #fff;background:#fbfbfb;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fbfbfb), color-stop(100%, #bbb));background:-webkit-linear-gradient(top, #fbfbfb 0%, #bbb 100%);background:-o-linear-gradient(top, #fbfbfb 0%, #bbb 100%);background:-webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#bbb));background:linear-gradient(to bottom, #fbfbfb 0%, #bbb 100%)}.lt-ie9 body .typography input.action:focus,.lt-ie9 body .typography input.action:active{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb', endColorstr='#bbb',GradientType=0 )}body .typography input.action:hover,body .typography input.action:focus{cursor:pointer}body .typography input[type="checkbox"],body .typography input[type="radio"]{border:medium none;height:auto;line-height:normal;padding:0;width:auto;margin-right:6px;float:left;margin-top:3px}body .typography #install_button{font-size:20px;color:#fff;border-color:#78A127 #78A127 #59781D;text-shadow:0 1px 1px #4D7326;padding:8px 14px;background-color:green;background:#80BF40;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #80BF40), color-stop(100%, #59862D));background:-webkit-linear-gradient(top, #80BF40 0%, #59862D 100%);background:-o-linear-gradient(top, #80BF40 0%, #59862D 100%);background:-webkit-gradient(linear, left top, left bottom, from(#80BF40), to(#59862D));background:linear-gradient(to bottom, #80BF40 0%, #59862D 100%);-webkit-box-shadow:0 1px 0 0 #fff;box-shadow:0 1px 0 0 #fff}.lt-ie9 body .typography #install_button{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80BF40', endColorstr='#59862D',GradientType=0 )}body .typography #install_button:hover{-webkit-box-shadow:0 1px 3px 0 #bbb;box-shadow:0 1px 3px 0 #bbb}body .typography #install_button:focus,body .typography #install_button:active{-webkit-box-shadow:0 1px 0 0 #fff;box-shadow:0 1px 0 0 #fff;background:#80BF40;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #80BF40), color-stop(100%, #59862D));background:-webkit-linear-gradient(top, #80BF40 0%, #59862D 100%);background:-o-linear-gradient(top, #80BF40 0%, #59862D 100%);background:-webkit-gradient(linear, left top, left bottom, from(#80BF40), to(#59862D));background:linear-gradient(to bottom, #80BF40 0%, #59862D 100%)}.lt-ie9 body .typography #install_button:focus,.lt-ie9 body .typography #install_button:active{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80BF40', endColorstr='#59862D',GradientType=0 )}body .typography #install_button[disabled=disabled]{border:1px solid #aaa;border-color:#bbb #bbb #aaa;color:#999;text-shadow:0 1px 0 #eee;background:#fbfbfb;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fbfbfb), color-stop(100%, #bbb));background:-webkit-linear-gradient(top, #fbfbfb 0%, #bbb 100%);background:-o-linear-gradient(top, #fbfbfb 0%, #bbb 100%);background:-webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#bbb));background:linear-gradient(to bottom, #fbfbfb 0%, #bbb 100%)}.lt-ie9 body .typography #install_button[disabled=disabled]{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb', endColorstr='#bbb',GradientType=0 )}body .typography #install_button[disabled=disabled]:hover{-webkit-box-shadow:0 1px 0 0 #fff;box-shadow:0 1px 0 0 #fff}body #Container{margin-bottom:40px}body #Container h3.sectionHeading{padding-top:27px;border-top:1px solid #B1C0C5;clear:both}body #Container #Header{margin-bottom:30px;height:200px}body #Container #Header div.left{width:698px;margin-top:47px}body #Container #Navigation{display:none}body h5.requirement{padding:12px 18px;font-size:14px;border:1px solid #798c93;border-top:1px solid #8d9da3;margin:0;color:#fff;position:relative;text-shadow:0 -1px 0 #71858c;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px;-webkit-box-shadow:0 1px 0 0 #fff;box-shadow:0 1px 0 0 #fff;background-color:#eee;background:#B1C0C5;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #B1C0C5), color-stop(100%, #7F9198));background:-webkit-linear-gradient(top, #B1C0C5 0%, #7F9198 100%);background:-o-linear-gradient(top, #B1C0C5 0%, #7F9198 100%);background:-webkit-gradient(linear, left top, left bottom, from(#B1C0C5), to(#7F9198));background:linear-gradient(to bottom, #B1C0C5 0%, #7F9198 100%)}.lt-ie9 body h5.requirement{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#B1C0C5', endColorstr='#7F9198',GradientType=0 )}body h5.requirement span{font-weight:normal;font-size:12px;padding:3px 6px;margin-left:5px;text-shadow:none;background-color:#fafbfb;-moz-border-radius-topleft:2px;-moz-border-radius-topright:2px;-moz-border-radius-bottomright:2px;-moz-border-radius-bottomleft:2px;border-radius:2px 2px 2px 2px;-webkit-box-shadow:0 0 2px 0 #7F9198;box-shadow:0 0 2px 0 #7F9198}body h5.requirement.good span{color:#359318}body h5.requirement.warning span{color:#E07127}body h5.requirement.error span{color:#C61414}body h5.requirement a{font-size:11px;right:9px;position:absolute;line-height:19px;margin:0 0 0 30px;color:#fff;text-decoration:none;font-weight:normal;padding-right:21px;background:transparent url(../../../admin/images/arrows.png) no-repeat right top}body h5.requirement a:hover{background:transparent url(../../../admin/images/arrows.png) no-repeat right -40px}body table.testResults{border-top:none;margin-top:-1px;margin-bottom:9px;-webkit-box-shadow:0 1px 0 0 #fff;box-shadow:0 1px 0 0 #fff;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px;overflow:hidden}body table.testResults tr.good{display:none;border:none}body table.testResults tr.good td{color:#359318}body table.testResults tr.warning{border:none}body table.testResults tr.warning td{color:#E07127}body table.testResults tr.error{border:none;color:#C61414}body table.testResults td{border:1px solid #ddd;width:50%}body #database_selection,body #Themes{list-style:none;margin:0;margin-bottom:18px;padding-left:0}body #database_selection li,body #Themes li{clear:left;padding:3px 0}body #database_selection li .dbfields,body #Themes li .dbfields{padding:12px;border:1px solid #ddd;background-color:#fafafa;margin-bottom:9px;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px;-webkit-box-shadow:inset 0 0 3px 0 #ddd;box-shadow:inset 0 0 3px 0 #ddd;-webkit-box-shadow:0 1px 0 0 #fff;box-shadow:0 1px 0 0 #fff}body ul#Themes{float:left;width:445px}body .databaseError{width:422px}body #Footer{margin-top:67px;margin-bottom:18px}body #Footer p{font-size:12px;color:#999}body #Header h1{margin-top:45px;margin-bottom:27px}body #Header h3{margin-top:-10px}#adminAcc,#devHelp,#localeHelp{padding-top:20px}#devHelp,#devSection{height:18em}#use_environment_field{margin-bottom:25px;background-color:#FAFAFA;border:1px solid #DDDDDD;border-radius:3px 3px 3px 3px;-webkit-box-shadow:0 1px 0 0 white;box-shadow:0 1px 0 0 white;margin-bottom:9px;padding:10px 10px 8px}#use_environment_field input{float:left;margin-right:5px}.databaseError ul{margin-bottom:0}.databaseError ul,.databaseError li{margin-left:0;padding-left:0}#Layout p.goodInstall{color:#359318}.goodInstall{padding:0.5em;background-color:#e2fee1;border:1px #43cb3e solid;color:#359318;overflow:hidden;line-height:18px;padding:10px}.goodInstall a{float:right;font-size:18px;padding:0 2px 2px 0;font-weight:bold}
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc3RhbGwuc2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Tg7XG59XG4uZ29vZEluc3RhbGwge1xuXHRwYWRkaW5nOiAwLjVlbTtcblx0YmFja2dyb3VuZC1jb2xvcjogI2UyZmVlMTtcblx0Ym9yZGVyOiAxcHggIzQzY2IzZSBzb2xpZDtcblx0Y29sb3I6ICMzNTkzMTg7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdGxpbmUtaGVpZ2h0OiAxOHB4O1xuXHRwYWRkaW5nOiAxMHB4O1xuXHRhIHtcblx0XHRmbG9hdDogcmlnaHQ7XG5cdFx0Zm9udC1zaXplOiAxOHB4O1xuXHRcdHBhZGRpbmc6IDAgMnB4IDJweCAwO1xuXHRcdGZvbnQtd2VpZ2h0OiBib2xkO1xuXHR9XG59XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= */
body{font-family:Arial,san-serif;margin-bottom:18px;width:940px;margin:0 auto 18px;background-color:#f4f4f4}body,body p{font-size:13px;line-height:18px;color:#333}body p{margin-bottom:18px}body a{color:#0973a6}body h1,body h2,body h3,body h4,body h5,body h6{color:#222;font-family:inherit;font-weight:700;margin:0;margin:27px 0 9px;text-rendering:optimizelegibility;clear:both;text-shadow:0 1px 0 #fff}body h1 small,body h2 small,body h3 small,body h4 small,body h5 small,body h6 small{font-weight:400;font-size:12px;color:#666}body h1{font-size:36px;background:transparent url(data:image/gif;base64,R0lGODlhoQCkALMGAABaknqRi7zIxZutqN7j4hBkmf///0CDrYKYkr/W5M3W0+7x8Ky6tzB5p3Ciwo+3zyH5BAEAAAYALAAAAAChAKQAAAT/0MhJq7046827/2AojmR5EYuprmzrbk/xvHRt39ZyADyB/8AgKFHg8RzCpDKpMzpTy6i0RXQ6Z9Os9rNwWK2HrXhsSTS+1gJ5Lfaiv1C2PEk4v7+JuR7ovuP3gDR1fm95gYcqMYSFiI0iBDuLjI6UHIqSb5WaGE2Ybw2boRNVnm9IopqdpW8CqJWkq2hqro1dsX6ntIFmt3cFcbp6fb1oWMFzg8RvYcdzw8pWDcDNYsnQX7/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S00wSOVt1LeyA6lHvbldQnJSrcglp+umYUXaBtW8UHItVGlau+9NE61QUqIap9uBKypvgbLkZ2KFWoE1Kg+P4cXd6u5qyTisUXybS0FzDYtZHvLPkhDhJ/94t0AO9XCS35NlaPEa3wWXt3faM2oHf0nIafyycQuGaO8wZ4EPjy7EHyAAEEeqv2PuTSE53NzqvmjOFtYFb8TrpCopcDju9deEbzXyCG0ovvcJYJgy5iIjhbdE20JJhjfkMdzMajfKyrbLH+AymBn45TFzQMxmxgCa08zmNrv5zUiLAAA7) no-repeat 0 0;text-indent:-9999px;height:164px;width:161px;float:left;padding-right:40px;border-right:1px solid #b1c0c5;margin-right:40px}body h1,body h2{line-height:36px;letter-spacing:-.5px}body h2{font-size:34px}body h3{font-size:18px;line-height:27px}body h4{font-size:14px;margin:18px 0 9px}body h4,body h5{line-height:18px}body h5{font-size:12px;margin:18px 0 0}body .clear{clear:both}body .left{float:left}body .message{padding:2px 18px;margin-bottom:18px;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px}body .message p{margin:11px 0 13px}body .message.warning{background-color:#fcf8f2;border:1px solid #ffc28b}body .message.error{background-color:#fdf1f3;border:1px solid #f8c3cd}body .message ul{margin-left:18px;margin-top:-9px}body .helpText{float:right;width:425px;padding-left:20px;color:#666;margin-top:0;background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPlJREFUeNrEk6EOg0AMhnvLEKAIBoOYwZItGOwsGN6I8EYYsNOoLQgM5gwCQbJgEezuAuRWOMWSNWl6ufT/2h6FTNMER4z8DEAIETHP8wsLCfOYuTnnvZlnzNMoiii/WHUygImv7PiQhNg46M4grw2gKApe+bmIdV0Hx3FgHEdo21ZECXILw1B0cpLoiSwOggCGYQDDMMD3fbkLc84FDIiXAxdVVQVd10HTNGBZFh5lzT0jsrC+70XUNA08zwNKKQaYex1sjIv57HVdK3NO6IW/zLZtMYria2wAGc4qy1JVONsDpLgL13VV1dPdTTy0SIdX+W9/40eAAQD6VnXnAlj5kwAAAABJRU5ErkJggg==) no-repeat left 1px}body .helpText.requirementsHelpText{margin-top:17px}body .typography table{margin:9px 0 27px;border-collapse:collapse;width:100%}body .typography table thead tr td,body .typography table thead tr th{font-weight:700;vertical-align:bottom;padding:12px}body .typography table td,body .typography table th{padding:8px 12px;text-align:left}body .typography table td{vertical-align:top;border-top:none;background-color:#fff}body .typography table tbody tr:nth-child(odd) td,body .typography table tbody tr:nth-child(odd) th{background-color:#fcfcfc}body .typography table tbody tr:hover td,body .typography table tbody tr:hover th{background-color:#f6f6f6}body .typography table tfoot{font-style:italic;color:#888}body .typography input,body .typography select,body .typography textarea{width:420px;margin-bottom:9px;color:#707070;border:1px solid #ddd;display:inline-block;height:18px;padding:4px 6px;line-height:18px;font-size:13px;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px}body .typography input,body .typography textarea{-webkit-transition:border .2s linear,-webkit-box-shadow .2s linear;transition:border .2s linear,box-shadow .2s linear;box-shadow:inset 0 1px 3px rgba(0,0,0,.1)}body .typography input:focus,body .typography textarea:focus{outline:0;border-color:rgba(82,168,236,.8);box-shadow:inset 0 1px 3px rgba(0,0,0,.1),0 0 4px rgba(82,168,236,.6)}body .typography input[type=checkbox]:focus,body .typography input[type=file]:focus,body .typography select:focus{box-shadow:none;outline:1px dotted #666}body .typography select{height:26px}body .typography option{line-height:27px;font-size:12px;padding:2px 6px;color:#666}body .typography label{width:auto;float:none;padding-top:0;margin:0 0 5px;text-align:left;display:block}body .typography .fields{float:left}body .typography input.action{text-align:center;font-weight:700;margin:9px 0 27px;padding:6px 8px;width:200px;width:auto;color:#222;border:1px solid #aaa;text-shadow:0 1px 0 #eee;font-size:13px;float:none;height:auto;background:#fbfbfb;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fbfbfb),color-stop(100%,#bbb));background:-webkit-linear-gradient(top,#fbfbfb,#bbb);background:-webkit-gradient(linear,left top,left bottom,from(#fbfbfb),to(#bbb));background:linear-gradient(180deg,#fbfbfb 0,#bbb);-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px;box-shadow:0 1px 0 0 #fff;background-color:#ddd}.lt-ie9 body .typography input.action{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb',endColorstr='#bbb',GradientType=0)}body .typography input.action:hover{box-shadow:0 1px 2px 0 #ccc;background:#fbfbfb;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fbfbfb),color-stop(100%,#ccc));background:-webkit-linear-gradient(top,#fbfbfb,#ccc);background:-webkit-gradient(linear,left top,left bottom,from(#fbfbfb),to(#ccc));background:linear-gradient(180deg,#fbfbfb 0,#ccc)}.lt-ie9 body .typography input.action:hover{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb',endColorstr='#ccc',GradientType=0)}body .typography input.action:active,body .typography input.action:focus{box-shadow:0 1px 0 0 #fff;background:#fbfbfb;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fbfbfb),color-stop(100%,#bbb));background:-webkit-linear-gradient(top,#fbfbfb,#bbb);background:-webkit-gradient(linear,left top,left bottom,from(#fbfbfb),to(#bbb));background:linear-gradient(180deg,#fbfbfb 0,#bbb)}.lt-ie9 body .typography input.action:active,.lt-ie9 body .typography input.action:focus{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb',endColorstr='#bbb',GradientType=0)}body .typography input.action:focus,body .typography input.action:hover{cursor:pointer}body .typography input[type=checkbox],body .typography input[type=radio]{border:medium none;height:auto;line-height:normal;padding:0;width:auto;margin-right:6px;float:left;margin-top:3px}body .typography #install_button{font-size:20px;color:#fff;border-color:#78a127 #78a127 #59781d;text-shadow:0 1px 1px #4d7326;padding:8px 14px;background-color:green;background:#80bf40;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#80bf40),color-stop(100%,#59862d));background:-webkit-linear-gradient(top,#80bf40,#59862d);background:-webkit-gradient(linear,left top,left bottom,from(#80bf40),to(#59862d));background:linear-gradient(180deg,#80bf40 0,#59862d);box-shadow:0 1px 0 0 #fff}.lt-ie9 body .typography #install_button{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80BF40',endColorstr='#59862D',GradientType=0)}body .typography #install_button:hover{box-shadow:0 1px 3px 0 #bbb}body .typography #install_button:active,body .typography #install_button:focus{box-shadow:0 1px 0 0 #fff;background:#80bf40;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#80bf40),color-stop(100%,#59862d));background:-webkit-linear-gradient(top,#80bf40,#59862d);background:-webkit-gradient(linear,left top,left bottom,from(#80bf40),to(#59862d));background:linear-gradient(180deg,#80bf40 0,#59862d)}.lt-ie9 body .typography #install_button:active,.lt-ie9 body .typography #install_button:focus{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80BF40',endColorstr='#59862D',GradientType=0)}body .typography #install_button[disabled=disabled]{border:1px solid #aaa;border-color:#bbb #bbb #aaa;color:#999;text-shadow:0 1px 0 #eee;background:#fbfbfb;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fbfbfb),color-stop(100%,#bbb));background:-webkit-linear-gradient(top,#fbfbfb,#bbb);background:-webkit-gradient(linear,left top,left bottom,from(#fbfbfb),to(#bbb));background:linear-gradient(180deg,#fbfbfb 0,#bbb)}.lt-ie9 body .typography #install_button[disabled=disabled]{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb',endColorstr='#bbb',GradientType=0)}body .typography #install_button[disabled=disabled]:hover{box-shadow:0 1px 0 0 #fff}body #Container{margin-bottom:40px}body #Container h3.sectionHeading{padding-top:27px;border-top:1px solid #b1c0c5;clear:both}body #Container #Header{margin-bottom:30px;height:200px}body #Container #Header div.left{width:698px;margin-top:47px}body #Container #Navigation{display:none}body h5.requirement{padding:12px 18px;font-size:14px;border:1px solid #798c93;border-top:1px solid #8d9da3;margin:0;color:#fff;position:relative;text-shadow:0 -1px 0 #71858c;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px;box-shadow:0 1px 0 0 #fff;background-color:#eee;background:#b1c0c5;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#b1c0c5),color-stop(100%,#7f9198));background:-webkit-linear-gradient(top,#b1c0c5,#7f9198);background:-webkit-gradient(linear,left top,left bottom,from(#b1c0c5),to(#7f9198));background:linear-gradient(180deg,#b1c0c5 0,#7f9198)}.lt-ie9 body h5.requirement{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#B1C0C5',endColorstr='#7F9198',GradientType=0)}body h5.requirement span{font-weight:400;font-size:12px;padding:3px 6px;margin-left:5px;text-shadow:none;background-color:#fafbfb;-moz-border-radius-topleft:2px;-moz-border-radius-topright:2px;-moz-border-radius-bottomright:2px;-moz-border-radius-bottomleft:2px;border-radius:2px 2px 2px 2px;box-shadow:0 0 2px 0 #7f9198}body h5.requirement.good span{color:#359318}body h5.requirement.warning span{color:#e07127}body h5.requirement.error span{color:#c61414}body h5.requirement a{font-size:11px;right:9px;position:absolute;line-height:19px;margin:0 0 0 30px;color:#fff;text-decoration:none;font-weight:400;padding-right:21px;background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAACgCAYAAADTnDZxAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0i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i0rbb59tYSb+KRl4hIsTPxCqziEaQdjbq/fCf0ipJ7MqrcfaYDyMYQWzzR6AtIFpFVfIIbxrHNSS4WOrL5DyL2GhhI4cZJJf7AJx+x+28SGCExgAhOYwAT+awYYjTd55ByUlxnwWOKmsRkI3maAXCQB259clAABVogJ7CY+Nshau1rLBJcrh1YoEyk2QiWjaFYmCJzAuWyC3TYuTE+9itm6vxF7iec7R67OGrN0NhaDb8X7aIM8yqEsrujGo/FRCFquWzGg2W24zMzXevwzRkXNc6orDrREr8nvwU/lpZZqlF2Q+FSzq6bJnWAG3HbIKF+e3gXVIfy+vJRKfYV4DaCg3nF03Nx+7aCySN8hT0lFJ469EGN48nyGTVV9mLmH9DAWz3wMHuY4TiwJik0fmd43vDQsXlMnXhoh6Bkg7ugiBkhgAhOYwHMa/inAAI8u0fa7CiXFAAAAAElFTkSuQmCC) no-repeat right -40px}body table.testResults{border-top:none;margin-top:-1px;margin-bottom:9px;box-shadow:0 1px 0 0 #fff;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px;overflow:hidden}body table.testResults tr.good{display:none;border:none}body table.testResults tr.good td{color:#359318}body table.testResults tr.warning{border:none}body table.testResults tr.warning td{color:#e07127}body table.testResults tr.error{border:none;color:#c61414}body table.testResults td{border:1px solid #ddd;width:50%}body #database_selection,body #Themes{list-style:none;margin:0;margin-bottom:18px;padding-left:0}body #database_selection li,body #Themes li{clear:left;padding:3px 0}body #database_selection li .dbfields,body #Themes li .dbfields{padding:12px;border:1px solid #ddd;background-color:#fafafa;margin-bottom:9px;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-radius:3px 3px 3px 3px;box-shadow:inset 0 0 3px 0 #ddd;box-shadow:0 1px 0 0 #fff}body ul#Themes{float:left;width:445px}body .databaseError{width:422px}body #Footer{margin-top:67px;margin-bottom:18px}body #Footer p{font-size:12px;color:#999}body #Header h1{margin-top:45px;margin-bottom:27px}body #Header h3{margin-top:-10px}#adminAcc,#devHelp,#localeHelp{padding-top:20px}#devHelp,#devSection{height:18em}#use_environment_field{margin-bottom:25px;background-color:#fafafa;border:1px solid #ddd;border-radius:3px 3px 3px 3px;box-shadow:0 1px 0 0 #fff;margin-bottom:9px;padding:10px 10px 8px}#use_environment_field input{float:left;margin-right:5px}.databaseError ul{margin-bottom:0}.databaseError li,.databaseError ul{margin-left:0;padding-left:0}#Layout p.goodInstall,.goodInstall{color:#359318}.goodInstall{padding:.5em;background-color:#e2fee1;border:1px solid #43cb3e;overflow:hidden;line-height:18px;padding:10px}.goodInstall a{float:right;font-size:18px;padding:0 2px 2px 0;font-weight:700}

View File

@ -106,7 +106,7 @@ body {
letter-spacing: -0.5px;
}
h1 {
background: transparent url(../../../admin/images/logo.gif) no-repeat left top;
background: transparent url(../images/logo.gif) no-repeat left top;
text-indent: -9999px;
height: 164px;
width: 161px;
@ -173,7 +173,7 @@ body {
padding-left: 20px;
color: #666;
margin-top: 0;
background: transparent url(../../../admin/images/question.png) no-repeat left 1px;
background: transparent url(../images/question.png) no-repeat left 1px;
&.requirementsHelpText {
margin-top: 17px;
}
@ -410,9 +410,9 @@ body {
text-decoration: none;
font-weight: normal;
padding-right: 21px;
background: transparent url(../../../admin/images/arrows.png) no-repeat right top;
background: transparent url(../images/arrows.png) no-repeat right top;
&:hover {
background: transparent url(../../../admin/images/arrows.png) no-repeat right -40px;
background: transparent url(../images/arrows.png) no-repeat right -40px;
}
}
}

View File

@ -36,19 +36,8 @@ class CMSSecurity extends Security {
protected function init() {
parent::init();
// Include CMS styles and js
Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/styles/bundle.css');
Requirements::combine_files(
'cmssecurity.js',
array(
THIRDPARTY_DIR . '/jquery/jquery.js',
THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js',
THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/sspath.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/CMSSecurity.js'
)
);
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/bundle-lib.js');
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/CMSSecurity.js');
}
public function Link($action = null) {

View File

@ -106,8 +106,6 @@ class Group extends DataObject {
* @return FieldList
*/
public function getCMSFields() {
Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/PermissionCheckboxSetField.js');
$fields = new FieldList(
new TabSet("Root",
new Tab('Members', _t('SecurityAdmin.MEMBERS', 'Members'),

View File

@ -1,97 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.AddToCampaignForm', ['jQuery', 'i18n', 'react', 'react-dom', 'react-redux', 'components/FormBuilderModal/FormBuilderModal'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'), require('i18n'), require('react'), require('react-dom'), require('react-redux'), require('components/FormBuilderModal/FormBuilderModal'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery, global.i18n, global.react, global.reactDom, global.reactRedux, global.FormBuilderModal);
global.ssAddToCampaignForm = mod.exports;
}
})(this, function (_jQuery, _i18n, _react, _reactDom, _reactRedux, _FormBuilderModal) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
var _i18n2 = _interopRequireDefault(_i18n);
var _react2 = _interopRequireDefault(_react);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _FormBuilderModal2 = _interopRequireDefault(_FormBuilderModal);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss', function ($) {
$('.cms-content-actions .add-to-campaign-action,' + '#add-to-campaign__action').entwine({
onclick: function onclick() {
var dialog = $('#add-to-campaign__dialog-wrapper');
if (!dialog.length) {
dialog = $('<div id="add-to-campaign__dialog-wrapper" />');
$('body').append(dialog);
}
dialog.open();
return false;
}
});
$('#add-to-campaign__dialog-wrapper').entwine({
open: function open() {
this._renderModal();
},
close: function close() {
this._clearModal();
},
_renderModal: function _renderModal() {
var _this = this;
var handleHide = function handleHide() {
return _this._clearModal();
};
var handleSubmit = function handleSubmit() {
return _this._handleSubmitModal.apply(_this, arguments);
};
var id = $('form.cms-edit-form :input[name=ID]').val();
var store = window.ss.store;
var sectionConfig = store.getState().config.sections['SilverStripe\\CMS\\Controllers\\CMSPageEditController'];
var modalSchemaUrl = sectionConfig.form.AddToCampaignForm.schemaUrl + '/' + id;
_reactDom2.default.render(_react2.default.createElement(
_reactRedux.Provider,
{ store: store },
_react2.default.createElement(_FormBuilderModal2.default, {
show: true,
handleSubmit: handleSubmit,
handleHide: handleHide,
schemaUrl: modalSchemaUrl,
bodyClassName: 'add-to-campaign__dialog',
responseClassBad: 'add-to-campaign__response add-to-campaign__response--error',
responseClassGood: 'add-to-campaign__response add-to-campaign__response--good'
})
), this[0]);
},
_clearModal: function _clearModal() {
_reactDom2.default.unmountComponentAtNode(this[0]);
},
_handleSubmitModal: function _handleSubmitModal(event, fieldValues, submitFn) {
event.preventDefault();
if (!fieldValues.Campaign) {
alert(_i18n2.default._t('AddToCampaigns.ErrorCampaignNotSelected', 'There was no campaign selected to be added to'));
return null;
}
return submitFn();
}
});
});
});

View File

@ -1,174 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.ActionTabSet', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssLeftAndMainActionTabSet = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss', function ($) {
$('.ss-tabset.ss-ui-action-tabset').entwine({
IgnoreTabState: true,
onadd: function onadd() {
this._super();
this.tabs({ 'collapsible': true, 'active': false });
},
onremove: function onremove() {
var frame = $('.cms-container').find('iframe');
frame.each(function (index, iframe) {
try {
$(iframe).contents().off('click.ss-ui-action-tabset');
} catch (e) {
console.warn('Unable to access iframe, possible https mis-match');
}
});
$(document).off('click.ss-ui-action-tabset');
this._super();
},
'ontabsbeforeactivate': function ontabsbeforeactivate(event, ui) {
this.riseUp(event, ui);
},
onclick: function onclick(event, ui) {
this.attachCloseHandler(event, ui);
},
attachCloseHandler: function attachCloseHandler(event, ui) {
var that = this,
frame = $('.cms-container').find('iframe'),
_closeHandler;
_closeHandler = function closeHandler(event) {
var panel, frame;
panel = $(event.target).closest('.ss-ui-action-tabset .ui-tabs-panel');
if (!$(event.target).closest(that).length && !panel.length) {
that.tabs('option', 'active', false);
frame = $('.cms-container').find('iframe');
frame.each(function (index, iframe) {
$(iframe).contents().off('click.ss-ui-action-tabset', _closeHandler);
});
$(document).off('click.ss-ui-action-tabset', _closeHandler);
}
};
$(document).on('click.ss-ui-action-tabset', _closeHandler);
if (frame.length > 0) {
frame.each(function (index, iframe) {
$(iframe).contents().on('click.ss-ui-action-tabset', _closeHandler);
});
}
},
riseUp: function riseUp(event, ui) {
var elHeight, trigger, endOfWindow, elPos, activePanel, activeTab, topPosition, containerSouth, padding;
elHeight = $(this).find('.ui-tabs-panel').outerHeight();
trigger = $(this).find('.ui-tabs-nav').outerHeight();
endOfWindow = $(window).height() + $(document).scrollTop() - trigger;
elPos = $(this).find('.ui-tabs-nav').offset().top;
activePanel = ui.newPanel;
activeTab = ui.newTab;
if (elPos + elHeight >= endOfWindow && elPos - elHeight > 0) {
this.addClass('rise-up');
if (activeTab.position() !== null) {
topPosition = -activePanel.outerHeight();
containerSouth = activePanel.parents('.toolbar--south');
if (containerSouth) {
padding = activeTab.offset().top - containerSouth.offset().top;
topPosition = topPosition - padding;
}
$(activePanel).css('top', topPosition + "px");
}
} else {
this.removeClass('rise-up');
if (activeTab.position() !== null) {
$(activePanel).css('bottom', '100%');
}
}
return false;
}
});
$('.cms-content-actions .ss-tabset.ss-ui-action-tabset').entwine({
'ontabsbeforeactivate': function ontabsbeforeactivate(event, ui) {
this._super(event, ui);
if ($(ui.newPanel).length > 0) {
$(ui.newPanel).css('left', ui.newTab.position().left + "px");
}
}
});
$('.cms-actions-row.ss-tabset.ss-ui-action-tabset').entwine({
'ontabsbeforeactivate': function ontabsbeforeactivate(event, ui) {
this._super(event, ui);
$(this).closest('.ss-ui-action-tabset').removeClass('tabset-open tabset-open-last');
}
});
$('.cms-content-fields .ss-tabset.ss-ui-action-tabset').entwine({
'ontabsbeforeactivate': function ontabsbeforeactivate(event, ui) {
this._super(event, ui);
if ($(ui.newPanel).length > 0) {
if ($(ui.newTab).hasClass("last")) {
$(ui.newPanel).css({ 'left': 'auto', 'right': '0px' });
$(ui.newPanel).parent().addClass('tabset-open-last');
} else {
$(ui.newPanel).css('left', ui.newTab.position().left + "px");
if ($(ui.newTab).hasClass("first")) {
$(ui.newPanel).css('left', "0px");
$(ui.newPanel).parent().addClass('tabset-open');
}
}
}
}
});
$('.cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset').entwine({
'from .ui-tabs-nav li': {
onhover: function onhover(e) {
$(e.target).parent().find('li .active').removeClass('active');
$(e.target).find('a').addClass('active');
}
},
'ontabsbeforeactivate': function ontabsbeforeactivate(event, ui) {
this._super(event, ui);
$(ui.newPanel).css({ 'left': 'auto', 'right': 'auto' });
if ($(ui.newPanel).length > 0) {
$(ui.newPanel).parent().addClass('tabset-open');
}
}
});
});
});

View File

@ -1,301 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.BatchActions', ['jQuery', 'i18n'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'), require('i18n'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery, global.i18n);
global.ssLeftAndMainBatchActions = mod.exports;
}
})(this, function (_jQuery, _i18n) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
var _i18n2 = _interopRequireDefault(_i18n);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss.tree', function ($) {
$('#Form_BatchActionsForm').entwine({
Actions: [],
getTree: function getTree() {
return $('.cms-tree');
},
fromTree: {
oncheck_node: function oncheck_node(e, data) {
this.serializeFromTree();
},
onuncheck_node: function onuncheck_node(e, data) {
this.serializeFromTree();
}
},
onmatch: function onmatch() {
var self = this;
self.getTree().bind('load_node.jstree', function (e, data) {
self.refreshSelected();
});
},
onunmatch: function onunmatch() {
var self = this;
self.getTree().unbind('load_node.jstree');
},
registerDefault: function registerDefault() {
this.register(ss.config.adminUrl + 'pages/batchactions/publish', function (ids) {
var confirmed = confirm(_i18n2.default.inject(_i18n2.default._t("CMSMAIN.BATCH_PUBLISH_PROMPT", "You have {num} page(s) selected.\n\nDo you really want to publish?"), { 'num': ids.length }));
return confirmed ? ids : false;
});
this.register(ss.config.adminUrl + 'pages/batchactions/unpublish', function (ids) {
var confirmed = confirm(_i18n2.default.inject(_i18n2.default._t("CMSMAIN.BATCH_UNPUBLISH_PROMPT", "You have {num} page(s) selected.\n\nDo you really want to unpublish"), { 'num': ids.length }));
return confirmed ? ids : false;
});
this.register(ss.config.adminUrl + 'pages/batchactions/delete', function (ids) {
var confirmed = confirm(_i18n2.default.inject(_i18n2.default._t("CMSMAIN.BATCH_DELETE_PROMPT", "You have {num} page(s) selected.\n\nDo you really want to delete?"), { 'num': ids.length }));
return confirmed ? ids : false;
});
this.register(ss.config.adminUrl + 'pages/batchactions/archive', function (ids) {
var confirmed = confirm(_i18n2.default.inject(_i18n2.default._t("CMSMAIN.BATCH_ARCHIVE_PROMPT", "You have {num} page(s) selected.\n\nAre you sure you want to archive these pages?\n\nThese pages and all of their children pages will be unpublished and sent to the archive."), { 'num': ids.length }));
return confirmed ? ids : false;
});
this.register(ss.config.adminUrl + 'pages/batchactions/restore', function (ids) {
var confirmed = confirm(_i18n2.default.inject(_i18n2.default._t("CMSMAIN.BATCH_RESTORE_PROMPT", "You have {num} page(s) selected.\n\nDo you really want to restore to stage?\n\nChildren of archived pages will be restored to the root level, unless those pages are also being restored."), { 'num': ids.length }));
return confirmed ? ids : false;
});
this.register(ss.config.adminUrl + 'pages/batchactions/deletefromlive', function (ids) {
var confirmed = confirm(_i18n2.default.inject(_i18n2.default._t("CMSMAIN.BATCH_DELETELIVE_PROMPT", "You have {num} page(s) selected.\n\nDo you really want to delete these pages from live?"), { 'num': ids.length }));
return confirmed ? ids : false;
});
},
onadd: function onadd() {
this.registerDefault();
this._super();
},
register: function register(type, callback) {
this.trigger('register', { type: type, callback: callback });
var actions = this.getActions();
actions[type] = callback;
this.setActions(actions);
},
unregister: function unregister(type) {
this.trigger('unregister', { type: type });
var actions = this.getActions();
if (actions[type]) delete actions[type];
this.setActions(actions);
},
refreshSelected: function refreshSelected(rootNode) {
var self = this,
st = this.getTree(),
ids = this.getIDs(),
allIds = [],
viewMode = $('.cms-content-batchactions-button'),
actionUrl = this.find(':input[name=Action]').val();
if (rootNode == null) rootNode = st;
for (var idx in ids) {
$($(st).getNodeByID(idx)).addClass('selected').attr('selected', 'selected');
}
if (!actionUrl || actionUrl == -1 || !viewMode.hasClass('active')) {
$(rootNode).find('li').each(function () {
$(this).setEnabled(true);
});
return;
}
$(rootNode).find('li').each(function () {
allIds.push($(this).data('id'));
$(this).addClass('treeloading').setEnabled(false);
});
var actionUrlParts = $.path.parseUrl(actionUrl);
var applicablePagesUrl = actionUrlParts.hrefNoSearch + '/applicablepages/';
applicablePagesUrl = $.path.addSearchParams(applicablePagesUrl, actionUrlParts.search);
applicablePagesUrl = $.path.addSearchParams(applicablePagesUrl, { csvIDs: allIds.join(',') });
jQuery.getJSON(applicablePagesUrl, function (applicableIDs) {
jQuery(rootNode).find('li').each(function () {
$(this).removeClass('treeloading');
var id = $(this).data('id');
if (id == 0 || $.inArray(id, applicableIDs) >= 0) {
$(this).setEnabled(true);
} else {
$(this).removeClass('selected').setEnabled(false);
$(this).prop('selected', false);
}
});
self.serializeFromTree();
});
},
serializeFromTree: function serializeFromTree() {
var tree = this.getTree(),
ids = tree.getSelectedIDs();
this.setIDs(ids);
return true;
},
setIDs: function setIDs(ids) {
this.find(':input[name=csvIDs]').val(ids ? ids.join(',') : null);
},
getIDs: function getIDs() {
var value = this.find(':input[name=csvIDs]').val();
return value ? value.split(',') : [];
},
onsubmit: function onsubmit(e) {
var self = this,
ids = this.getIDs(),
tree = this.getTree(),
actions = this.getActions();
if (!ids || !ids.length) {
alert(_i18n2.default._t('CMSMAIN.SELECTONEPAGE', 'Please select at least one page'));
e.preventDefault();
return false;
}
var type = this.find(':input[name=Action]').val();
if (actions[type]) {
ids = this.getActions()[type].apply(this, [ids]);
}
if (!ids || !ids.length) {
e.preventDefault();
return false;
}
this.setIDs(ids);
tree.find('li').removeClass('failed');
var button = this.find(':submit:first');
button.addClass('loading');
jQuery.ajax({
url: type,
type: 'POST',
data: this.serializeArray(),
complete: function complete(xmlhttp, status) {
button.removeClass('loading');
tree.jstree('refresh', -1);
self.setIDs([]);
self.find(':input[name=Action]').val('').change();
var msg = xmlhttp.getResponseHeader('X-Status');
if (msg) statusMessage(decodeURIComponent(msg), status == 'success' ? 'good' : 'bad');
},
success: function success(data, status) {
var id, node;
if (data.modified) {
var modifiedNodes = [];
for (id in data.modified) {
node = tree.getNodeByID(id);
tree.jstree('set_text', node, data.modified[id]['TreeTitle']);
modifiedNodes.push(node);
}
$(modifiedNodes).effect('highlight');
}
if (data.deleted) {
for (id in data.deleted) {
node = tree.getNodeByID(id);
if (node.length) tree.jstree('delete_node', node);
}
}
if (data.error) {
for (id in data.error) {
node = tree.getNodeByID(id);
$(node).addClass('failed');
}
}
},
dataType: 'json'
});
e.preventDefault();
return false;
}
});
$('.cms-content-batchactions-button').entwine({
onmatch: function onmatch() {
this._super();
this.updateTree();
},
onunmatch: function onunmatch() {
this._super();
},
onclick: function onclick(e) {
this.updateTree();
},
updateTree: function updateTree() {
var tree = $('.cms-tree'),
form = $('#Form_BatchActionsForm');
this._super();
if (this.data('active')) {
tree.addClass('multiple');
tree.removeClass('draggable');
form.serializeFromTree();
} else {
tree.removeClass('multiple');
tree.addClass('draggable');
}
$('#Form_BatchActionsForm').refreshSelected();
}
});
$('#Form_BatchActionsForm select[name=Action]').entwine({
onchange: function onchange(e) {
var form = $(e.target.form),
btn = form.find(':submit'),
selected = $(e.target).val();
if (!selected || selected == -1) {
btn.attr('disabled', 'disabled').button('refresh');
} else {
btn.removeAttr('disabled').button('refresh');
}
$('#Form_BatchActionsForm').refreshSelected();
this.trigger("chosen:updated");
this._super(e);
}
});
});
});

View File

@ -1,97 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.Content', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssLeftAndMainContent = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss', function ($) {
$('.cms-content').entwine({
onadd: function onadd() {
var self = this;
this.find('.cms-tabset').redrawTabs();
this._super();
},
redraw: function redraw() {
if (window.debug) console.log('redraw', this.attr('class'), this.get(0));
this.add(this.find('.cms-tabset')).redrawTabs();
this.find('.cms-content-header').redraw();
this.find('.cms-content-actions').redraw();
}
});
$('.cms-content .cms-tree').entwine({
onadd: function onadd() {
var self = this;
this._super();
this.bind('select_node.jstree', function (e, data) {
var node = data.rslt.obj,
loadedNodeID = self.find(':input[name=ID]').val(),
origEvent = data.args[2],
container = $('.cms-container');
if (!origEvent) {
return false;
}
if ($(node).hasClass('disabled')) return false;
if ($(node).data('id') == loadedNodeID) return;
var url = $(node).find('a:first').attr('href');
if (url && url != '#') {
url = url.split('?')[0];
self.jstree('deselect_all');
self.jstree('uncheck_all');
if ($.path.isExternal($(node).find('a:first'))) url = url = $.path.makeUrlAbsolute(url, $('base').attr('href'));
if (document.location.search) url = $.path.addSearchParams(url, document.location.search.replace(/^\?/, ''));
container.loadPanel(url);
} else {
self.removeForm();
}
});
}
});
$('.cms-content .cms-content-fields').entwine({
redraw: function redraw() {
if (window.debug) console.log('redraw', this.attr('class'), this.get(0));
}
});
$('.cms-content .cms-content-header, .cms-content .cms-content-actions').entwine({
redraw: function redraw() {
if (window.debug) console.log('redraw', this.attr('class'), this.get(0));
this.height('auto');
this.height(this.innerHeight() - this.css('padding-top') - this.css('padding-bottom'));
}
});
});
});

View File

@ -1,303 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.EditForm', ['jQuery', 'i18n'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'), require('i18n'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery, global.i18n);
global.ssLeftAndMainEditForm = mod.exports;
}
})(this, function (_jQuery, _i18n) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
var _i18n2 = _interopRequireDefault(_i18n);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
window.onbeforeunload = function (e) {
var form = (0, _jQuery2.default)('.cms-edit-form');
form.trigger('beforesubmitform');
if (form.is('.changed') && !form.is('.discardchanges')) {
return _i18n2.default._t('LeftAndMain.CONFIRMUNSAVEDSHORT');
}
};
_jQuery2.default.entwine('ss', function ($) {
$('.cms-edit-form').entwine({
PlaceholderHtml: '',
ChangeTrackerOptions: {
ignoreFieldSelector: '.no-change-track, .ss-upload :input, .cms-navigator :input'
},
ValidationErrorShown: false,
onadd: function onadd() {
var self = this;
this.attr("autocomplete", "off");
this._setupChangeTracker();
for (var overrideAttr in { 'action': true, 'method': true, 'enctype': true, 'name': true }) {
var el = this.find(':input[name=' + '_form_' + overrideAttr + ']');
if (el) {
this.attr(overrideAttr, el.val());
el.remove();
}
}
this.setValidationErrorShown(false);
this._super();
},
'from .cms-tabset': {
onafterredrawtabs: function onafterredrawtabs() {
if (this.hasClass('validationerror')) {
var tabError = this.find('.message.validation, .message.required').first().closest('.tab');
$('.cms-container').clearCurrentTabState();
var $tabSet = tabError.closest('.ss-tabset');
if (!$tabSet.length) {
$tabSet = tabError.closest('.cms-tabset');
}
if ($tabSet.length) {
$tabSet.tabs('option', 'active', tabError.index('.tab'));
} else if (!this.getValidationErrorShown()) {
this.setValidationErrorShown(true);
errorMessage(ss.i18n._t('ModelAdmin.VALIDATIONERROR', 'Validation Error'));
}
}
}
},
onremove: function onremove() {
this.changetracker('destroy');
this._super();
},
onmatch: function onmatch() {
this._super();
},
onunmatch: function onunmatch() {
this._super();
},
redraw: function redraw() {
if (window.debug) console.log('redraw', this.attr('class'), this.get(0));
this.add(this.find('.cms-tabset')).redrawTabs();
this.find('.cms-content-header').redraw();
},
_setupChangeTracker: function _setupChangeTracker() {
this.changetracker(this.getChangeTrackerOptions());
},
confirmUnsavedChanges: function confirmUnsavedChanges() {
this.trigger('beforesubmitform');
if (!this.is('.changed') || this.is('.discardchanges')) {
return true;
}
var confirmed = confirm(_i18n2.default._t('LeftAndMain.CONFIRMUNSAVED'));
if (confirmed) {
this.addClass('discardchanges');
}
return confirmed;
},
onsubmit: function onsubmit(e, button) {
if (this.prop("target") != "_blank") {
if (button) this.closest('.cms-container').submitForm(this, button);
return false;
}
},
validate: function validate() {
var isValid = true;
this.trigger('validate', { isValid: isValid });
return isValid;
},
'from .htmleditor': {
oneditorinit: function oneditorinit(e) {
var self = this,
field = $(e.target).closest('.field.htmleditor'),
editor = field.find('textarea.htmleditor').getEditor().getInstance();
editor.onClick.add(function (e) {
self.saveFieldFocus(field.attr('id'));
});
}
},
'from .cms-edit-form :input:not(:submit)': {
onclick: function onclick(e) {
this.saveFieldFocus($(e.target).attr('id'));
},
onfocus: function onfocus(e) {
this.saveFieldFocus($(e.target).attr('id'));
}
},
'from .cms-edit-form .treedropdown *': {
onfocusin: function onfocusin(e) {
var field = $(e.target).closest('.field.treedropdown');
this.saveFieldFocus(field.attr('id'));
}
},
'from .cms-edit-form .dropdown .chosen-container a': {
onfocusin: function onfocusin(e) {
var field = $(e.target).closest('.field.dropdown');
this.saveFieldFocus(field.attr('id'));
}
},
'from .cms-container': {
ontabstaterestored: function ontabstaterestored(e) {
this.restoreFieldFocus();
}
},
saveFieldFocus: function saveFieldFocus(selected) {
if (typeof window.sessionStorage == "undefined" || window.sessionStorage === null) return;
var id = $(this).attr('id'),
focusElements = [];
focusElements.push({
id: id,
selected: selected
});
if (focusElements) {
try {
window.sessionStorage.setItem(id, JSON.stringify(focusElements));
} catch (err) {
if (err.code === DOMException.QUOTA_EXCEEDED_ERR && window.sessionStorage.length === 0) {
return;
} else {
throw err;
}
}
}
},
restoreFieldFocus: function restoreFieldFocus() {
if (typeof window.sessionStorage == "undefined" || window.sessionStorage === null) return;
var self = this,
hasSessionStorage = typeof window.sessionStorage !== "undefined" && window.sessionStorage,
sessionData = hasSessionStorage ? window.sessionStorage.getItem(this.attr('id')) : null,
sessionStates = sessionData ? JSON.parse(sessionData) : false,
elementID,
tabbed = this.find('.ss-tabset').length !== 0,
activeTab,
elementTab,
toggleComposite,
scrollY;
if (hasSessionStorage && sessionStates.length > 0) {
$.each(sessionStates, function (i, sessionState) {
if (self.is('#' + sessionState.id)) {
elementID = $('#' + sessionState.selected);
}
});
if ($(elementID).length < 1) {
this.focusFirstInput();
return;
}
activeTab = $(elementID).closest('.ss-tabset').find('.ui-tabs-nav .ui-tabs-active .ui-tabs-anchor').attr('id');
elementTab = 'tab-' + $(elementID).closest('.ss-tabset .ui-tabs-panel').attr('id');
if (tabbed && elementTab !== activeTab) {
return;
}
toggleComposite = $(elementID).closest('.togglecomposite');
if (toggleComposite.length > 0) {
toggleComposite.accordion('activate', toggleComposite.find('.ui-accordion-header'));
}
scrollY = $(elementID).position().top;
if (!$(elementID).is(':visible')) {
elementID = '#' + $(elementID).closest('.field').attr('id');
scrollY = $(elementID).position().top;
}
$(elementID).focus();
if (scrollY > $(window).height() / 2) {
self.find('.cms-content-fields').scrollTop(scrollY);
}
} else {
this.focusFirstInput();
}
},
focusFirstInput: function focusFirstInput() {
this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(':visible:first').focus();
}
});
$('.cms-edit-form .btn-toolbar input.action[type=submit], .cms-edit-form .btn-toolbar button.action').entwine({
onclick: function onclick(e) {
if (this.hasClass('gridfield-button-delete') && !confirm(_i18n2.default._t('TABLEFIELD.DELETECONFIRMMESSAGE'))) {
e.preventDefault();
return false;
}
if (!this.is(':disabled')) {
this.parents('form').trigger('submit', [this]);
}
e.preventDefault();
return false;
}
});
$('.cms-edit-form .btn-toolbar input.action[type=submit].ss-ui-action-cancel, .cms-edit-form .btn-toolbar button.action.ss-ui-action-cancel').entwine({
onclick: function onclick(e) {
if (window.history.length > 1) {
window.history.back();
} else {
this.parents('form').trigger('submit', [this]);
}
e.preventDefault();
}
});
$('.cms-edit-form .ss-tabset').entwine({
onmatch: function onmatch() {
if (!this.hasClass('ss-ui-action-tabset')) {
var tabs = this.find("> ul:first");
if (tabs.children("li").length == 1) {
tabs.hide().parent().addClass("ss-tabset-tabshidden");
}
}
this._super();
},
onunmatch: function onunmatch() {
this._super();
}
});
});
var errorMessage = function errorMessage(text) {
jQuery.noticeAdd({ text: text, type: 'error', stayTime: 5000, inEffect: { left: '0', opacity: 'show' } });
};
});

View File

@ -1,52 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.FieldDescriptionToggle', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssLeftAndMainFieldDescriptionToggle = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss', function ($) {
$('.cms-description-toggle').entwine({
onadd: function onadd() {
var shown = false,
fieldId = this.prop('id').substr(0, this.prop('id').indexOf('_Holder')),
$trigger = this.find('.cms-description-trigger'),
$description = this.find('.description');
if (this.hasClass('description-toggle-enabled')) {
return;
}
if ($trigger.length === 0) {
$trigger = this.find('.middleColumn').first().after('<label class="right" for="' + fieldId + '"><a class="cms-description-trigger" href="javascript:void(0)"><span class="btn-icon-information"></span></a></label>').next();
}
this.addClass('description-toggle-enabled');
$trigger.on('click', function () {
$description[shown ? 'hide' : 'show']();
shown = !shown;
});
$description.hide();
}
});
});
});

View File

@ -1,48 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.FieldHelp', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssLeftAndMainFieldHelp = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss', function ($) {
$(".cms .field.cms-description-tooltip").entwine({
onmatch: function onmatch() {
this._super();
var descriptionEl = this.find('.description'),
inputEl,
tooltipEl;
if (descriptionEl.length) {
this.attr('title', descriptionEl.text()).tooltip({ content: descriptionEl.html() });
descriptionEl.remove();
}
}
});
$(".cms .field.cms-description-tooltip :input").entwine({
onfocusin: function onfocusin(e) {
this.closest('.field').tooltip('open');
},
onfocusout: function onfocusout(e) {
this.closest('.field').tooltip('close');
}
});
});
});

View File

@ -1,146 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.Layout', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssLeftAndMainLayout = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.fn.layout.defaults.resize = false;
jLayout = typeof jLayout === 'undefined' ? {} : jLayout;
jLayout.threeColumnCompressor = function (spec, options) {
if (typeof spec.menu === 'undefined' || typeof spec.content === 'undefined' || typeof spec.preview === 'undefined') {
throw 'Spec is invalid. Please provide "menu", "content" and "preview" elements.';
}
if (typeof options.minContentWidth === 'undefined' || typeof options.minPreviewWidth === 'undefined' || typeof options.mode === 'undefined') {
throw 'Spec is invalid. Please provide "minContentWidth", "minPreviewWidth", "mode"';
}
if (options.mode !== 'split' && options.mode !== 'content' && options.mode !== 'preview') {
throw 'Spec is invalid. "mode" should be either "split", "content" or "preview"';
}
var obj = {
options: options
};
var menu = _jQuery2.default.jLayoutWrap(spec.menu),
content = _jQuery2.default.jLayoutWrap(spec.content),
preview = _jQuery2.default.jLayoutWrap(spec.preview);
obj.layout = function (container) {
var size = container.bounds(),
insets = container.insets(),
top = insets.top,
bottom = size.height - insets.bottom,
left = insets.left,
right = size.width - insets.right;
var menuWidth = spec.menu.width(),
contentWidth = 0,
previewWidth = 0;
if (this.options.mode === 'preview') {
contentWidth = 0;
previewWidth = right - left - menuWidth;
} else if (this.options.mode === 'content') {
contentWidth = right - left - menuWidth;
previewWidth = 0;
} else {
contentWidth = (right - left - menuWidth) / 2;
previewWidth = right - left - (menuWidth + contentWidth);
if (contentWidth < this.options.minContentWidth) {
contentWidth = this.options.minContentWidth;
previewWidth = right - left - (menuWidth + contentWidth);
} else if (previewWidth < this.options.minPreviewWidth) {
previewWidth = this.options.minPreviewWidth;
contentWidth = right - left - (menuWidth + previewWidth);
}
if (contentWidth < this.options.minContentWidth || previewWidth < this.options.minPreviewWidth) {
contentWidth = right - left - menuWidth;
previewWidth = 0;
}
}
var prehidden = {
content: spec.content.hasClass('column-hidden'),
preview: spec.preview.hasClass('column-hidden')
};
var posthidden = {
content: contentWidth === 0,
preview: previewWidth === 0
};
spec.content.toggleClass('column-hidden', posthidden.content);
spec.preview.toggleClass('column-hidden', posthidden.preview);
menu.bounds({ 'x': left, 'y': top, 'height': bottom - top, 'width': menuWidth });
menu.doLayout();
left += menuWidth;
content.bounds({ 'x': left, 'y': top, 'height': bottom - top, 'width': contentWidth });
if (!posthidden.content) content.doLayout();
left += contentWidth;
preview.bounds({ 'x': left, 'y': top, 'height': bottom - top, 'width': previewWidth });
if (!posthidden.preview) preview.doLayout();
if (posthidden.content !== prehidden.content) spec.content.trigger('columnvisibilitychanged');
if (posthidden.preview !== prehidden.preview) spec.preview.trigger('columnvisibilitychanged');
if (contentWidth + previewWidth < options.minContentWidth + options.minPreviewWidth) {
spec.preview.trigger('disable');
} else {
spec.preview.trigger('enable');
}
return container;
};
function typeLayout(type) {
var func = type + 'Size';
return function (container) {
var menuSize = menu[func](),
contentSize = content[func](),
previewSize = preview[func](),
insets = container.insets();
width = menuSize.width + contentSize.width + previewSize.width;
height = Math.max(menuSize.height, contentSize.height, previewSize.height);
return {
'width': insets.left + insets.right + width,
'height': insets.top + insets.bottom + height
};
};
}
obj.preferred = typeLayout('preferred');
obj.minimum = typeLayout('minimum');
obj.maximum = typeLayout('maximum');
return obj;
};
});

View File

@ -1,383 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.Menu', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssLeftAndMainMenu = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss', function ($) {
$('.cms-panel.cms-menu').entwine({
togglePanel: function togglePanel(doExpand, silent, doSaveState) {
$('.cms-menu-list').children('li').each(function () {
if (doExpand) {
$(this).children('ul').each(function () {
$(this).removeClass('collapsed-flyout');
if ($(this).data('collapse')) {
$(this).removeData('collapse');
$(this).addClass('collapse');
}
});
} else {
$(this).children('ul').each(function () {
$(this).addClass('collapsed-flyout');
$(this).hasClass('collapse');
$(this).removeClass('collapse');
$(this).data('collapse', true);
});
}
});
this.toggleFlyoutState(doExpand);
this._super(doExpand, silent, doSaveState);
},
toggleFlyoutState: function toggleFlyoutState(bool) {
if (bool) {
$('.collapsed').find('li').show();
$('.cms-menu-list').find('.child-flyout-indicator').hide();
} else {
$('.collapsed-flyout').find('li').each(function () {
$(this).hide();
});
var par = $('.cms-menu-list ul.collapsed-flyout').parent();
if (par.children('.child-flyout-indicator').length === 0) par.append('<span class="child-flyout-indicator"></span>').fadeIn();
par.children('.child-flyout-indicator').fadeIn();
}
},
siteTreePresent: function siteTreePresent() {
return $('#cms-content-tools-CMSMain').length > 0;
},
getPersistedStickyState: function getPersistedStickyState() {
var persistedState, cookieValue;
if ($.cookie !== void 0) {
cookieValue = $.cookie('cms-menu-sticky');
if (cookieValue !== void 0 && cookieValue !== null) {
persistedState = cookieValue === 'true';
}
}
return persistedState;
},
setPersistedStickyState: function setPersistedStickyState(isSticky) {
if ($.cookie !== void 0) {
$.cookie('cms-menu-sticky', isSticky, { path: '/', expires: 31 });
}
},
getEvaluatedCollapsedState: function getEvaluatedCollapsedState() {
var shouldCollapse,
manualState = this.getPersistedCollapsedState(),
menuIsSticky = $('.cms-menu').getPersistedStickyState(),
automaticState = this.siteTreePresent();
if (manualState === void 0) {
shouldCollapse = automaticState;
} else if (manualState !== automaticState && menuIsSticky) {
shouldCollapse = manualState;
} else {
shouldCollapse = automaticState;
}
return shouldCollapse;
},
onadd: function onadd() {
var self = this;
setTimeout(function () {
self.togglePanel(!self.getEvaluatedCollapsedState(), false, false);
}, 0);
$(window).on('ajaxComplete', function (e) {
setTimeout(function () {
self.togglePanel(!self.getEvaluatedCollapsedState(), false, false);
}, 0);
});
this._super();
}
});
$('.cms-menu-list').entwine({
onmatch: function onmatch() {
var self = this;
this.find('li.current').select();
this.updateItems();
this._super();
},
onunmatch: function onunmatch() {
this._super();
},
updateMenuFromResponse: function updateMenuFromResponse(xhr) {
var controller = xhr.getResponseHeader('X-Controller');
if (controller) {
var item = this.find('li#Menu-' + controller.replace(/\\/g, '-').replace(/[^a-zA-Z0-9\-_:.]+/, ''));
if (!item.hasClass('current')) item.select();
}
this.updateItems();
},
'from .cms-container': {
onafterstatechange: function onafterstatechange(e, data) {
this.updateMenuFromResponse(data.xhr);
},
onaftersubmitform: function onaftersubmitform(e, data) {
this.updateMenuFromResponse(data.xhr);
}
},
'from .cms-edit-form': {
onrelodeditform: function onrelodeditform(e, data) {
this.updateMenuFromResponse(data.xmlhttp);
}
},
getContainingPanel: function getContainingPanel() {
return this.closest('.cms-panel');
},
fromContainingPanel: {
ontoggle: function ontoggle(e) {
this.toggleClass('collapsed', $(e.target).hasClass('collapsed'));
$('.cms-container').trigger('windowresize');
if (this.hasClass('collapsed')) this.find('li.children.opened').removeClass('opened');
if (!this.hasClass('collapsed')) {
$('.toggle-children.opened').closest('li').addClass('opened');
}
}
},
updateItems: function updateItems() {
var editPageItem = this.find('#Menu-CMSMain');
editPageItem[editPageItem.is('.current') ? 'show' : 'hide']();
var currentID = $('.cms-content input[name=ID]').val();
if (currentID) {
this.find('li').each(function () {
if ($.isFunction($(this).setRecordID)) $(this).setRecordID(currentID);
});
}
}
});
$('.cms-menu-list li').entwine({
toggleFlyout: function toggleFlyout(bool) {
var fly = $(this);
if (fly.children('ul').first().hasClass('collapsed-flyout')) {
if (bool) {
if (!fly.children('ul').first().children('li').first().hasClass('clone')) {
var li = fly.clone();
li.addClass('clone').css({});
li.children('ul').first().remove();
li.find('span').not('.text').remove();
li.find('a').first().unbind('click');
fly.children('ul').prepend(li);
}
$('.collapsed-flyout').show();
fly.addClass('opened');
fly.children('ul').find('li').fadeIn('fast');
} else {
if (li) {
li.remove();
}
$('.collapsed-flyout').hide();
fly.removeClass('opened');
fly.find('toggle-children').removeClass('opened');
fly.children('ul').find('li').hide();
}
}
}
});
$('.cms-menu-list li').hoverIntent(function () {
$(this).toggleFlyout(true);
}, function () {
$(this).toggleFlyout(false);
});
$('.cms-menu-list .toggle').entwine({
onclick: function onclick(e) {
e.preventDefault();
$(this).toogleFlyout(true);
}
});
$('.cms-menu-list li').entwine({
onmatch: function onmatch() {
if (this.find('ul').length) {
this.find('a:first').append('<span class="toggle-children"><span class="toggle-children-icon"></span></span>');
}
this._super();
},
onunmatch: function onunmatch() {
this._super();
},
toggle: function toggle() {
this[this.hasClass('opened') ? 'close' : 'open']();
},
open: function open() {
var parent = this.getMenuItem();
if (parent) parent.open();
if (this.find('li.clone')) {
this.find('li.clone').remove();
}
this.addClass('opened').find('ul').show();
this.find('.toggle-children').addClass('opened');
},
close: function close() {
this.removeClass('opened').find('ul').hide();
this.find('.toggle-children').removeClass('opened');
},
select: function select() {
var parent = this.getMenuItem();
this.addClass('current').open();
this.siblings().removeClass('current').close();
this.siblings().find('li').removeClass('current');
if (parent) {
var parentSiblings = parent.siblings();
parent.addClass('current');
parentSiblings.removeClass('current').close();
parentSiblings.find('li').removeClass('current').close();
}
this.getMenu().updateItems();
this.trigger('select');
}
});
$('.cms-menu-list *').entwine({
getMenu: function getMenu() {
return this.parents('.cms-menu-list:first');
}
});
$('.cms-menu-list li *').entwine({
getMenuItem: function getMenuItem() {
return this.parents('li:first');
}
});
$('.cms-menu-list li a').entwine({
onclick: function onclick(e) {
var isExternal = $.path.isExternal(this.attr('href'));
if (e.which > 1 || isExternal) return;
if (this.attr('target') == "_blank") {
return;
}
e.preventDefault();
var item = this.getMenuItem();
var url = this.attr('href');
if (!isExternal) url = $('base').attr('href') + url;
var children = item.find('li');
if (children.length) {
children.first().find('a').click();
} else {
document.location.href = url;
}
item.select();
}
});
$('.cms-menu-list li .toggle-children').entwine({
onclick: function onclick(e) {
var li = this.closest('li');
li.toggle();
return false;
}
});
$('.cms .profile-link').entwine({
onclick: function onclick() {
$('.cms-container').loadPanel(this.attr('href'));
$('.cms-menu-list li').removeClass('current').close();
return false;
}
});
$('.cms-menu .sticky-toggle').entwine({
onadd: function onadd() {
var isSticky = $('.cms-menu').getPersistedStickyState() ? true : false;
this.toggleCSS(isSticky);
this.toggleIndicator(isSticky);
this._super();
},
toggleCSS: function toggleCSS(isSticky) {
this[isSticky ? 'addClass' : 'removeClass']('active');
},
toggleIndicator: function toggleIndicator(isSticky) {
this.next('.sticky-status-indicator').text(isSticky ? 'fixed' : 'auto');
},
onclick: function onclick() {
var $menu = this.closest('.cms-menu'),
persistedCollapsedState = $menu.getPersistedCollapsedState(),
persistedStickyState = $menu.getPersistedStickyState(),
newStickyState = persistedStickyState === void 0 ? !this.hasClass('active') : !persistedStickyState;
if (persistedCollapsedState === void 0) {
$menu.setPersistedCollapsedState($menu.hasClass('collapsed'));
} else if (persistedCollapsedState !== void 0 && newStickyState === false) {
$menu.clearPersistedCollapsedState();
}
$menu.setPersistedStickyState(newStickyState);
this.toggleCSS(newStickyState);
this.toggleIndicator(newStickyState);
this._super();
}
});
});
});

View File

@ -1,175 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.Panel', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssLeftAndMainPanel = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss', function ($) {
$.entwine.warningLevel = $.entwine.WARN_LEVEL_BESTPRACTISE;
$('.cms-panel').entwine({
WidthExpanded: null,
WidthCollapsed: null,
canSetCookie: function canSetCookie() {
return $.cookie !== void 0 && this.attr('id') !== void 0;
},
getPersistedCollapsedState: function getPersistedCollapsedState() {
var isCollapsed, cookieValue;
if (this.canSetCookie()) {
cookieValue = $.cookie('cms-panel-collapsed-' + this.attr('id'));
if (cookieValue !== void 0 && cookieValue !== null) {
isCollapsed = cookieValue === 'true';
}
}
return isCollapsed;
},
setPersistedCollapsedState: function setPersistedCollapsedState(newState) {
if (this.canSetCookie()) {
$.cookie('cms-panel-collapsed-' + this.attr('id'), newState, { path: '/', expires: 31 });
}
},
clearPersistedCollapsedState: function clearPersistedCollapsedState() {
if (this.canSetCookie()) {
$.cookie('cms-panel-collapsed-' + this.attr('id'), '', { path: '/', expires: -1 });
}
},
getInitialCollapsedState: function getInitialCollapsedState() {
var isCollapsed = this.getPersistedCollapsedState();
if (isCollapsed === void 0) {
isCollapsed = this.hasClass('collapsed');
}
return isCollapsed;
},
onadd: function onadd() {
var collapsedContent, container;
if (!this.find('.cms-panel-content').length) throw new Exception('Content panel for ".cms-panel" not found');
if (!this.find('.cms-panel-toggle').length) {
container = $("<div class='cms-panel-toggle south'></div>").append('<a class="toggle-expand" href="#"><span>&raquo;</span></a>').append('<a class="toggle-collapse" href="#"><span>&laquo;</span></a>');
this.append(container);
}
this.setWidthExpanded(this.find('.cms-panel-content').innerWidth());
collapsedContent = this.find('.cms-panel-content-collapsed');
this.setWidthCollapsed(collapsedContent.length ? collapsedContent.innerWidth() : this.find('.toggle-expand').innerWidth());
this.togglePanel(!this.getInitialCollapsedState(), true, false);
this._super();
},
togglePanel: function togglePanel(doExpand, silent, doSaveState) {
var newWidth, collapsedContent;
if (!silent) {
this.trigger('beforetoggle.sspanel', doExpand);
this.trigger(doExpand ? 'beforeexpand' : 'beforecollapse');
}
this.toggleClass('collapsed', !doExpand);
newWidth = doExpand ? this.getWidthExpanded() : this.getWidthCollapsed();
this.width(newWidth);
collapsedContent = this.find('.cms-panel-content-collapsed');
if (collapsedContent.length) {
this.find('.cms-panel-content')[doExpand ? 'show' : 'hide']();
this.find('.cms-panel-content-collapsed')[doExpand ? 'hide' : 'show']();
}
if (doSaveState !== false) {
this.setPersistedCollapsedState(!doExpand);
}
this.trigger('toggle', doExpand);
this.trigger(doExpand ? 'expand' : 'collapse');
},
expandPanel: function expandPanel(force) {
if (!force && !this.hasClass('collapsed')) return;
this.togglePanel(true);
},
collapsePanel: function collapsePanel(force) {
if (!force && this.hasClass('collapsed')) return;
this.togglePanel(false);
}
});
$('.cms-panel.collapsed .cms-panel-toggle').entwine({
onclick: function onclick(e) {
this.expandPanel();
e.preventDefault();
}
});
$('.cms-panel *').entwine({
getPanel: function getPanel() {
return this.parents('.cms-panel:first');
}
});
$('.cms-panel .toggle-expand').entwine({
onclick: function onclick(e) {
e.preventDefault();
e.stopPropagation();
this.getPanel().expandPanel();
this._super(e);
}
});
$('.cms-panel .toggle-collapse').entwine({
onclick: function onclick(e) {
e.preventDefault();
e.stopPropagation();
this.getPanel().collapsePanel();
this._super(e);
}
});
$('.cms-content-tools.collapsed').entwine({
onclick: function onclick(e) {
this.expandPanel();
this._super(e);
}
});
});
});

View File

@ -1,563 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.Preview', ['jQuery', 'i18n'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'), require('i18n'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery, global.i18n);
global.ssLeftAndMainPreview = mod.exports;
}
})(this, function (_jQuery, _i18n) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
var _i18n2 = _interopRequireDefault(_i18n);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss.preview', function ($) {
$('.cms-preview').entwine({
AllowedStates: ['StageLink', 'LiveLink', 'ArchiveLink'],
CurrentStateName: null,
CurrentSizeName: 'auto',
IsPreviewEnabled: false,
DefaultMode: 'split',
Sizes: {
auto: {
width: '100%',
height: '100%'
},
mobile: {
width: '335px',
height: '568px'
},
mobileLandscape: {
width: '583px',
height: '320px'
},
tablet: {
width: '783px',
height: '1024px'
},
tabletLandscape: {
width: '1039px',
height: '768px'
},
desktop: {
width: '1024px',
height: '800px'
}
},
changeState: function changeState(stateName, save) {
var self = this,
states = this._getNavigatorStates();
if (save !== false) {
$.each(states, function (index, state) {
self.saveState('state', stateName);
});
}
this.setCurrentStateName(stateName);
this._loadCurrentState();
this.redraw();
return this;
},
changeMode: function changeMode(modeName, save) {
var container = $('.cms-container');
if (modeName == 'split') {
container.entwine('.ss').splitViewMode();
this.setIsPreviewEnabled(true);
this._loadCurrentState();
} else if (modeName == 'content') {
container.entwine('.ss').contentViewMode();
this.setIsPreviewEnabled(false);
} else if (modeName == 'preview') {
container.entwine('.ss').previewMode();
this.setIsPreviewEnabled(true);
this._loadCurrentState();
} else {
throw 'Invalid mode: ' + modeName;
}
if (save !== false) this.saveState('mode', modeName);
this.redraw();
return this;
},
changeSize: function changeSize(sizeName) {
var sizes = this.getSizes();
this.setCurrentSizeName(sizeName);
this.removeClass('auto desktop tablet mobile').addClass(sizeName);
this.find('.preview-device-outer').width(sizes[sizeName].width).height(sizes[sizeName].height);
this.find('.preview-device-inner').width(sizes[sizeName].width);
this.saveState('size', sizeName);
this.redraw();
return this;
},
redraw: function redraw() {
if (window.debug) console.log('redraw', this.attr('class'), this.get(0));
var currentStateName = this.getCurrentStateName();
if (currentStateName) {
this.find('.cms-preview-states').changeVisibleState(currentStateName);
}
var layoutOptions = $('.cms-container').entwine('.ss').getLayoutOptions();
if (layoutOptions) {
$('.preview-mode-selector').changeVisibleMode(layoutOptions.mode);
}
var currentSizeName = this.getCurrentSizeName();
if (currentSizeName) {
this.find('.preview-size-selector').changeVisibleSize(this.getCurrentSizeName());
}
return this;
},
saveState: function saveState(name, value) {
if (this._supportsLocalStorage()) window.localStorage.setItem('cms-preview-state-' + name, value);
},
loadState: function loadState(name) {
if (this._supportsLocalStorage()) return window.localStorage.getItem('cms-preview-state-' + name);
},
disablePreview: function disablePreview() {
this.setPendingURL(null);
this._loadUrl('about:blank');
this._block();
this.changeMode('content', false);
this.setIsPreviewEnabled(false);
return this;
},
enablePreview: function enablePreview() {
if (!this.getIsPreviewEnabled()) {
this.setIsPreviewEnabled(true);
if ($.browser.msie && $.browser.version.slice(0, 3) <= 7) {
this.changeMode('content');
} else {
this.changeMode(this.getDefaultMode(), false);
}
}
return this;
},
getOrAppendFontFixStyleElement: function getOrAppendFontFixStyleElement() {
var style = $('#FontFixStyleElement');
if (!style.length) {
style = $('<style type="text/css" id="FontFixStyleElement" disabled="disabled">' + ':before,:after{content:none !important}' + '</style>').appendTo('head');
}
return style;
},
onadd: function onadd() {
var self = this,
layoutContainer = this.parent(),
iframe = this.find('iframe');
iframe.addClass('center');
iframe.bind('load', function () {
self._adjustIframeForPreview();
self._loadCurrentPage();
$(this).removeClass('loading');
});
if ($.browser.msie && 8 === parseInt($.browser.version, 10)) {
iframe.bind('readystatechange', function (e) {
if (iframe[0].readyState == 'interactive') {
self.getOrAppendFontFixStyleElement().removeAttr('disabled');
setTimeout(function () {
self.getOrAppendFontFixStyleElement().attr('disabled', 'disabled');
}, 0);
}
});
}
this.append('<div class="cms-preview-overlay ui-widget-overlay-light"></div>');
this.find('.cms-preview-overlay').hide();
this.disablePreview();
this._super();
},
_supportsLocalStorage: function _supportsLocalStorage() {
var uid = new Date();
var storage;
var result;
try {
(storage = window.localStorage).setItem(uid, uid);
result = storage.getItem(uid) == uid;
storage.removeItem(uid);
return result && storage;
} catch (exception) {
console.warn('localStorge is not available due to current browser / system settings.');
}
},
onenable: function onenable() {
var $viewModeSelector = $('.preview-mode-selector');
$viewModeSelector.removeClass('split-disabled');
$viewModeSelector.find('.disabled-tooltip').hide();
},
ondisable: function ondisable() {
var $viewModeSelector = $('.preview-mode-selector');
$viewModeSelector.addClass('split-disabled');
$viewModeSelector.find('.disabled-tooltip').show();
},
_block: function _block() {
this.addClass('blocked');
this.find('.cms-preview-overlay').show();
return this;
},
_unblock: function _unblock() {
this.removeClass('blocked');
this.find('.cms-preview-overlay').hide();
return this;
},
_initialiseFromContent: function _initialiseFromContent() {
var mode, size;
if (!$('.cms-previewable').length) {
this.disablePreview();
} else {
mode = this.loadState('mode');
size = this.loadState('size');
this._moveNavigator();
if (!mode || mode != 'content') {
this.enablePreview();
this._loadCurrentState();
}
this.redraw();
if (mode) this.changeMode(mode);
if (size) this.changeSize(size);
}
return this;
},
'from .cms-container': {
onafterstatechange: function onafterstatechange(e, data) {
if (data.xhr.getResponseHeader('X-ControllerURL')) return;
this._initialiseFromContent();
}
},
PendingURL: null,
oncolumnvisibilitychanged: function oncolumnvisibilitychanged() {
var url = this.getPendingURL();
if (url && !this.is('.column-hidden')) {
this.setPendingURL(null);
this._loadUrl(url);
this._unblock();
}
},
'from .cms-container .cms-edit-form': {
onaftersubmitform: function onaftersubmitform() {
this._initialiseFromContent();
}
},
_loadUrl: function _loadUrl(url) {
this.find('iframe').addClass('loading').attr('src', url);
return this;
},
_getNavigatorStates: function _getNavigatorStates() {
var urlMap = $.map(this.getAllowedStates(), function (name) {
var stateLink = $('.cms-preview-states .state-name[data-name=' + name + ']');
if (stateLink.length) {
return {
name: name,
url: stateLink.attr('href'),
active: stateLink.hasClass('active')
};
} else {
return null;
}
});
return urlMap;
},
_loadCurrentState: function _loadCurrentState() {
if (!this.getIsPreviewEnabled()) return this;
var states = this._getNavigatorStates();
var currentStateName = this.getCurrentStateName();
var currentState = null;
if (states) {
currentState = $.grep(states, function (state, index) {
return currentStateName === state.name || !currentStateName && state.active;
});
}
var url = null;
if (currentState[0]) {
url = currentState[0].url;
} else if (states.length) {
this.setCurrentStateName(states[0].name);
url = states[0].url;
} else {
this.setCurrentStateName(null);
}
if (url) {
url += (url.indexOf('?') === -1 ? '?' : '&') + 'CMSPreview=1';
}
if (this.is('.column-hidden')) {
this.setPendingURL(url);
this._loadUrl('about:blank');
this._block();
} else {
this.setPendingURL(null);
if (url) {
this._loadUrl(url);
this._unblock();
} else {
this._block();
}
}
return this;
},
_moveNavigator: function _moveNavigator() {
var previewEl = $('.cms-preview .cms-preview-controls');
var navigatorEl = $('.cms-edit-form .cms-navigator');
if (navigatorEl.length && previewEl.length) {
previewEl.html($('.cms-edit-form .cms-navigator').detach());
} else {
this._block();
}
},
_loadCurrentPage: function _loadCurrentPage() {
if (!this.getIsPreviewEnabled()) return;
var doc,
containerEl = $('.cms-container');
try {
doc = this.find('iframe')[0].contentDocument;
} catch (e) {
console.warn('Unable to access iframe, possible https mis-match');
}
if (!doc) {
return;
}
var id = $(doc).find('meta[name=x-page-id]').attr('content');
var editLink = $(doc).find('meta[name=x-cms-edit-link]').attr('content');
var contentPanel = $('.cms-content');
if (id && contentPanel.find(':input[name=ID]').val() != id) {
$('.cms-container').entwine('.ss').loadPanel(editLink);
}
},
_adjustIframeForPreview: function _adjustIframeForPreview() {
var iframe = this.find('iframe')[0],
doc;
if (!iframe) {
return;
}
try {
doc = iframe.contentDocument;
} catch (e) {
console.warn('Unable to access iframe, possible https mis-match');
}
if (!doc) {
return;
}
var links = doc.getElementsByTagName('A');
for (var i = 0; i < links.length; i++) {
var href = links[i].getAttribute('href');
if (!href) continue;
if (href.match(/^http:\/\//)) links[i].setAttribute('target', '_blank');
}
var navi = doc.getElementById('SilverStripeNavigator');
if (navi) navi.style.display = 'none';
var naviMsg = doc.getElementById('SilverStripeNavigatorMessage');
if (naviMsg) naviMsg.style.display = 'none';
this.trigger('afterIframeAdjustedForPreview', [doc]);
}
});
$('.cms-edit-form').entwine({
onadd: function onadd() {
this._super();
$('.cms-preview')._initialiseFromContent();
}
});
$('.cms-preview-states').entwine({
changeVisibleState: function changeVisibleState(state) {
this.find('[data-name="' + state + '"]').addClass('active').siblings().removeClass('active');
}
});
$('.cms-preview-states .state-name').entwine({
onclick: function onclick(e) {
if (e.which == 1) {
var targetStateName = $(this).attr('data-name');
this.addClass('active').siblings().removeClass('active');
$('.cms-preview').changeState(targetStateName);
e.preventDefault();
}
}
});
$('.preview-mode-selector').entwine({
changeVisibleMode: function changeVisibleMode(mode) {
this.find('select').val(mode).trigger('chosen:updated')._addIcon();
}
});
$('.preview-mode-selector select').entwine({
onchange: function onchange(e) {
this._super(e);
e.preventDefault();
var targetStateName = $(this).val();
$('.cms-preview').changeMode(targetStateName);
}
});
$('.cms-preview.column-hidden').entwine({
onmatch: function onmatch() {
$('#preview-mode-dropdown-in-content').show();
if ($('.cms-preview .result-selected').hasClass('font-icon-columns')) {
statusMessage(_i18n2.default._t('LeftAndMain.DISABLESPLITVIEW', "Screen too small to show site preview in split mode"), "error");
}
this._super();
},
onunmatch: function onunmatch() {
$('#preview-mode-dropdown-in-content').hide();
this._super();
}
});
$('#preview-mode-dropdown-in-content').entwine({
onmatch: function onmatch() {
if ($('.cms-preview').is('.column-hidden')) {
this.show();
} else {
this.hide();
}
this._super();
},
onunmatch: function onunmatch() {
this._super();
}
});
$('.preview-size-selector').entwine({
changeVisibleSize: function changeVisibleSize(size) {
this.find('select').val(size).trigger('chosen:updated')._addIcon();
}
});
$('.preview-size-selector select').entwine({
onchange: function onchange(e) {
e.preventDefault();
var targetSizeName = $(this).val();
$('.cms-preview').changeSize(targetSizeName);
}
});
$('.preview-selector select.preview-dropdown').entwine({
'onchosen:ready': function onchosenReady() {
this._super();
this._addIcon();
},
_addIcon: function _addIcon() {
var selected = this.find(':selected');
var iconClass = selected.attr('data-icon');
var target = this.parent().find('.chosen-container a.chosen-single');
var oldIcon = target.attr('data-icon');
if (typeof oldIcon !== 'undefined') {
target.removeClass(oldIcon);
}
target.addClass(iconClass);
target.attr('data-icon', iconClass);
return this;
}
});
$('.preview-mode-selector .chosen-drop li:last-child').entwine({
onmatch: function onmatch() {
if ($('.preview-mode-selector').hasClass('split-disabled')) {
this.parent().append('<div class="disabled-tooltip"></div>');
} else {
this.parent().append('<div class="disabled-tooltip" style="display: none;"></div>');
}
}
});
$('.preview-device-outer').entwine({
onclick: function onclick() {
this.toggleClass('rotate');
}
});
});
});

View File

@ -1,360 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.Tree', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssLeftAndMainTree = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss.tree', function ($) {
$('.cms-tree').entwine({
Hints: null,
IsUpdatingTree: false,
IsLoaded: false,
onadd: function onadd() {
this._super();
if ($.isNumeric(this.data('jstree_instance_id'))) return;
var hints = this.attr('data-hints');
if (hints) this.setHints($.parseJSON(hints));
var self = this;
this.jstree(this.getTreeConfig()).bind('loaded.jstree', function (e, data) {
self.setIsLoaded(true);
data.inst._set_settings({ 'html_data': { 'ajax': {
'url': self.data('urlTree'),
'data': function data(node) {
var params = self.data('searchparams') || [];
params = $.grep(params, function (n, i) {
return n.name != 'ID' && n.name != 'value';
});
params.push({ name: 'ID', value: $(node).data("id") ? $(node).data("id") : 0 });
params.push({ name: 'ajax', value: 1 });
return params;
}
} } });
self.updateFromEditForm();
self.css('visibility', 'visible');
data.inst.hide_checkboxes();
}).bind('before.jstree', function (e, data) {
if (data.func == 'start_drag') {
if (!self.hasClass('draggable') || self.hasClass('multiselect')) {
e.stopImmediatePropagation();
return false;
}
}
if ($.inArray(data.func, ['check_node', 'uncheck_node'])) {
var node = $(data.args[0]).parents('li:first');
var allowedChildren = node.find('li:not(.disabled)');
if (node.hasClass('disabled') && allowedChildren == 0) {
e.stopImmediatePropagation();
return false;
}
}
}).bind('move_node.jstree', function (e, data) {
if (self.getIsUpdatingTree()) return;
var movedNode = data.rslt.o,
newParentNode = data.rslt.np,
oldParentNode = data.inst._get_parent(movedNode),
newParentID = $(newParentNode).data('id') || 0,
nodeID = $(movedNode).data('id');
var siblingIDs = $.map($(movedNode).siblings().andSelf(), function (el) {
return $(el).data('id');
});
$.ajax({
'url': $.path.addSearchParams(self.data('urlSavetreenode'), self.data('extraParams')),
'type': 'POST',
'data': {
ID: nodeID,
ParentID: newParentID,
SiblingIDs: siblingIDs
},
success: function success() {
if ($('.cms-edit-form :input[name=ID]').val() == nodeID) {
$('.cms-edit-form :input[name=ParentID]').val(newParentID);
}
self.updateNodesFromServer([nodeID]);
},
statusCode: {
403: function _() {
$.jstree.rollback(data.rlbk);
}
}
});
}).bind('select_node.jstree check_node.jstree uncheck_node.jstree', function (e, data) {
$(document).triggerHandler(e, data);
});
},
onremove: function onremove() {
this.jstree('destroy');
this._super();
},
'from .cms-container': {
onafterstatechange: function onafterstatechange(e) {
this.updateFromEditForm();
}
},
'from .cms-container form': {
onaftersubmitform: function onaftersubmitform(e) {
var id = $('.cms-edit-form :input[name=ID]').val();
this.updateNodesFromServer([id]);
}
},
getTreeConfig: function getTreeConfig() {
var self = this;
return {
'core': {
'initially_open': ['record-0'],
'animation': 0,
'html_titles': true
},
'html_data': {},
'ui': {
"select_limit": 1,
'initially_select': [this.find('.current').attr('id')]
},
"crrm": {
'move': {
'check_move': function check_move(data) {
var movedNode = $(data.o),
newParent = $(data.np),
isMovedOntoContainer = data.ot.get_container()[0] == data.np[0],
movedNodeClass = movedNode.getClassname(),
newParentClass = newParent.getClassname(),
hints = self.getHints(),
disallowedChildren = [],
hintKey = newParentClass ? newParentClass : 'Root',
hint = hints && typeof hints[hintKey] != 'undefined' ? hints[hintKey] : null;
if (hint && movedNode.attr('class').match(/VirtualPage-([^\s]*)/)) movedNodeClass = RegExp.$1;
if (hint) disallowedChildren = typeof hint.disallowedChildren != 'undefined' ? hint.disallowedChildren : [];
var isAllowed = movedNode.data('id') !== 0 && !movedNode.hasClass('status-archived') && (!isMovedOntoContainer || data.p == 'inside') && !newParent.hasClass('nochildren') && (!disallowedChildren.length || $.inArray(movedNodeClass, disallowedChildren) == -1);
return isAllowed;
}
}
},
'dnd': {
"drop_target": false,
"drag_target": false
},
'checkbox': {
'two_state': true
},
'themes': {
'theme': 'apple',
'url': $('body').data('frameworkpath') + '/thirdparty/jstree/themes/apple/style.css'
},
'plugins': ['html_data', 'ui', 'dnd', 'crrm', 'themes', 'checkbox']
};
},
search: function search(params, callback) {
if (params) this.data('searchparams', params);else this.removeData('searchparams');
this.jstree('refresh', -1, callback);
},
getNodeByID: function getNodeByID(id) {
return this.find('*[data-id=' + id + ']');
},
createNode: function createNode(html, data, callback) {
var self = this,
parentNode = data.ParentID !== void 0 ? self.getNodeByID(data.ParentID) : false,
newNode = $(html);
var properties = { data: '' };
if (newNode.hasClass('jstree-open')) {
properties.state = 'open';
} else if (newNode.hasClass('jstree-closed')) {
properties.state = 'closed';
}
this.jstree('create_node', parentNode.length ? parentNode : -1, 'last', properties, function (node) {
var origClasses = node.attr('class');
for (var i = 0; i < newNode[0].attributes.length; i++) {
var attr = newNode[0].attributes[i];
node.attr(attr.name, attr.value);
}
node.addClass(origClasses).html(newNode.html());
callback(node);
});
},
updateNode: function updateNode(node, html, data) {
var self = this,
newNode = $(html);
var nextNode = data.NextID ? this.getNodeByID(data.NextID) : false;
var prevNode = data.PrevID ? this.getNodeByID(data.PrevID) : false;
var parentNode = data.ParentID ? this.getNodeByID(data.ParentID) : false;
$.each(['id', 'style', 'class', 'data-pagetype'], function (i, attrName) {
node.attr(attrName, newNode.attr(attrName));
});
var origChildren = node.children('ul').detach();
node.html(newNode.html()).append(origChildren);
if (nextNode && nextNode.length) {
this.jstree('move_node', node, nextNode, 'before');
} else if (prevNode && prevNode.length) {
this.jstree('move_node', node, prevNode, 'after');
} else {
this.jstree('move_node', node, parentNode.length ? parentNode : -1);
}
},
updateFromEditForm: function updateFromEditForm() {
var node,
id = $('.cms-edit-form :input[name=ID]').val();
if (id) {
node = this.getNodeByID(id);
if (node.length) {
this.jstree('deselect_all');
this.jstree('select_node', node);
} else {
this.updateNodesFromServer([id]);
}
} else {
this.jstree('deselect_all');
}
},
updateNodesFromServer: function updateNodesFromServer(ids) {
if (this.getIsUpdatingTree() || !this.getIsLoaded()) return;
var self = this,
i,
includesNewNode = false;
this.setIsUpdatingTree(true);
self.jstree('save_selected');
var correctStateFn = function correctStateFn(node) {
self.getNodeByID(node.data('id')).not(node).remove();
self.jstree('deselect_all');
self.jstree('select_node', node);
};
self.jstree('open_node', this.getNodeByID(0));
self.jstree('save_opened');
self.jstree('save_selected');
$.ajax({
url: $.path.addSearchParams(this.data('urlUpdatetreenodes'), 'ids=' + ids.join(',')),
dataType: 'json',
success: function success(data, xhr) {
$.each(data, function (nodeId, nodeData) {
var node = self.getNodeByID(nodeId);
if (!nodeData) {
self.jstree('delete_node', node);
return;
}
if (node.length) {
self.updateNode(node, nodeData.html, nodeData);
setTimeout(function () {
correctStateFn(node);
}, 500);
} else {
includesNewNode = true;
if (nodeData.ParentID && !self.find('li[data-id=' + nodeData.ParentID + ']').length) {
self.jstree('load_node', -1, function () {
newNode = self.find('li[data-id=' + nodeId + ']');
correctStateFn(newNode);
});
} else {
self.createNode(nodeData.html, nodeData, function (newNode) {
correctStateFn(newNode);
});
}
}
});
if (!includesNewNode) {
self.jstree('deselect_all');
self.jstree('reselect');
self.jstree('reopen');
}
},
complete: function complete() {
self.setIsUpdatingTree(false);
}
});
}
});
$('.cms-tree.multiple').entwine({
onmatch: function onmatch() {
this._super();
this.jstree('show_checkboxes');
},
onunmatch: function onunmatch() {
this._super();
this.jstree('uncheck_all');
this.jstree('hide_checkboxes');
},
getSelectedIDs: function getSelectedIDs() {
return $(this).jstree('get_checked').not('.disabled').map(function () {
return $(this).data('id');
}).get();
}
});
$('.cms-tree li').entwine({
setEnabled: function setEnabled(bool) {
this.toggleClass('disabled', !bool);
},
getClassname: function getClassname() {
var matches = this.attr('class').match(/class-([^\s]*)/i);
return matches ? matches[1] : '';
},
getID: function getID() {
return this.data('id');
}
});
});
});

View File

@ -1,34 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain.TreeDropdownField', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssLeftAndMainTreeDropdownField = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss', function ($) {
$('.TreeDropdownField').entwine({
'from .cms-container form': {
onaftersubmitform: function onaftersubmitform(e) {
this.find('.tree-holder').empty();
this._super();
}
}
});
});
});

View File

@ -1,1088 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.LeftAndMain', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssLeftAndMain = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
};
var windowWidth, windowHeight;
_jQuery2.default.noConflict();
window.ss = window.ss || {};
window.ss.debounce = function (func, wait, immediate) {
var timeout, context, args;
var later = function later() {
timeout = null;
if (!immediate) func.apply(context, args);
};
return function () {
var callNow = immediate && !timeout;
context = this;
args = arguments;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) {
func.apply(context, args);
}
};
};
(0, _jQuery2.default)(window).bind('resize.leftandmain', function (e) {
(0, _jQuery2.default)('.cms-container').trigger('windowresize');
});
_jQuery2.default.entwine.warningLevel = _jQuery2.default.entwine.WARN_LEVEL_BESTPRACTISE;
_jQuery2.default.entwine('ss', function ($) {
$(window).on("message", function (e) {
var target,
event = e.originalEvent,
data = _typeof(event.data) === 'object' ? event.data : JSON.parse(event.data);
if ($.path.parseUrl(window.location.href).domain !== $.path.parseUrl(event.origin).domain) return;
target = typeof data.target === 'undefined' ? $(window) : $(data.target);
switch (data.type) {
case 'event':
target.trigger(data.event, data.data);
break;
case 'callback':
target[data.callback].call(target, data.data);
break;
}
});
var positionLoadingSpinner = function positionLoadingSpinner() {
var offset = 120;
var spinner = $('.ss-loading-screen .loading-animation');
var top = ($(window).height() - spinner.height()) / 2;
spinner.css('top', top + offset);
spinner.show();
};
var applyChosen = function applyChosen(el) {
if (el.is(':visible')) {
el.addClass('has-chosen').chosen({
allow_single_deselect: true,
disable_search_threshold: 20,
display_disabled_options: true
});
} else {
setTimeout(function () {
el.show();
applyChosen(el);
}, 500);
}
};
var isSameUrl = function isSameUrl(url1, url2) {
var baseUrl = $('base').attr('href');
url1 = $.path.isAbsoluteUrl(url1) ? url1 : $.path.makeUrlAbsolute(url1, baseUrl), url2 = $.path.isAbsoluteUrl(url2) ? url2 : $.path.makeUrlAbsolute(url2, baseUrl);
var url1parts = $.path.parseUrl(url1),
url2parts = $.path.parseUrl(url2);
return url1parts.pathname.replace(/\/*$/, '') == url2parts.pathname.replace(/\/*$/, '') && url1parts.search == url2parts.search;
};
var ajaxCompleteEvent = window.ss.debounce(function () {
$(window).trigger('ajaxComplete');
}, 1000, true);
$(window).bind('resize', positionLoadingSpinner).trigger('resize');
$(document).ajaxComplete(function (e, xhr, settings) {
var origUrl = document.URL,
url = xhr.getResponseHeader('X-ControllerURL'),
destUrl = settings.url,
msg = xhr.getResponseHeader('X-Status') !== null ? xhr.getResponseHeader('X-Status') : xhr.statusText,
msgType = xhr.status < 200 || xhr.status > 399 ? 'bad' : 'good',
ignoredMessages = ['OK', 'success', 'HTTP/2.0 200'];
if (url !== null && (!isSameUrl(origUrl, url) || !isSameUrl(destUrl, url))) {
window.ss.router.show(url, {
id: new Date().getTime() + String(Math.random()).replace(/\D/g, ''),
pjax: xhr.getResponseHeader('X-Pjax') ? xhr.getResponseHeader('X-Pjax') : settings.headers['X-Pjax']
});
}
if (xhr.getResponseHeader('X-Reauthenticate')) {
$('.cms-container').showLoginDialog();
return;
}
if (xhr.status !== 0 && msg && $.inArray(msg, ignoredMessages) === -1) {
statusMessage(decodeURIComponent(msg), msgType);
}
ajaxCompleteEvent(this);
});
$('.cms-container').entwine({
StateChangeXHR: null,
FragmentXHR: {},
StateChangeCount: 0,
LayoutOptions: {
minContentWidth: 940,
minPreviewWidth: 400,
mode: 'content'
},
onadd: function onadd() {
if ($.browser.msie && parseInt($.browser.version, 10) < 8) {
$('.ss-loading-screen').append('<p class="ss-loading-incompat-warning"><span class="notice">' + 'Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.' + '</span></p>').css('z-index', $('.ss-loading-screen').css('z-index') + 1);
$('.loading-animation').remove();
this._super();
return;
}
this.redraw();
$('.ss-loading-screen').hide();
$('body').removeClass('loading');
$(window).unbind('resize', positionLoadingSpinner);
this.restoreTabState();
this._super();
},
'onwindowresize': function onwindowresize() {
this.redraw();
},
'from .cms-panel': {
ontoggle: function ontoggle() {
this.redraw();
}
},
'from .cms-container': {
onaftersubmitform: function onaftersubmitform() {
this.redraw();
}
},
updateLayoutOptions: function updateLayoutOptions(newSpec) {
var spec = this.getLayoutOptions();
var dirty = false;
for (var k in newSpec) {
if (spec[k] !== newSpec[k]) {
spec[k] = newSpec[k];
dirty = true;
}
}
if (dirty) this.redraw();
},
splitViewMode: function splitViewMode() {
this.updateLayoutOptions({
mode: 'split'
});
},
contentViewMode: function contentViewMode() {
this.updateLayoutOptions({
mode: 'content'
});
},
previewMode: function previewMode() {
this.updateLayoutOptions({
mode: 'preview'
});
},
RedrawSuppression: false,
redraw: function redraw() {
if (this.getRedrawSuppression()) return;
if (window.debug) console.log('redraw', this.attr('class'), this.get(0));
this.data('jlayout', jLayout.threeColumnCompressor({
menu: this.children('.cms-menu'),
content: this.children('.cms-content'),
preview: this.children('.cms-preview')
}, this.getLayoutOptions()));
this.layout();
this.find('.cms-panel-layout').redraw();
this.find('.cms-content-fields[data-layout-type]').redraw();
this.find('.cms-edit-form[data-layout-type]').redraw();
this.find('.cms-preview').redraw();
this.find('.cms-content').redraw();
},
checkCanNavigate: function checkCanNavigate(selectors) {
var contentEls = this._findFragments(selectors || ['Content']),
trackedEls = contentEls.find(':data(changetracker)').add(contentEls.filter(':data(changetracker)')),
safe = true;
if (!trackedEls.length) {
return true;
}
trackedEls.each(function () {
if (!$(this).confirmUnsavedChanges()) {
safe = false;
}
});
return safe;
},
loadPanel: function loadPanel(url) {
var title = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];
var data = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
var forceReload = arguments[3];
var forceReferer = arguments.length <= 4 || arguments[4] === undefined ? document.URL : arguments[4];
if (!this.checkCanNavigate(data.pjax ? data.pjax.split(',') : ['Content'])) {
return;
}
this.saveTabState();
data.__forceReferer = forceReferer;
if (forceReload) {
data.__forceReload = 1 + Math.random();
}
window.ss.router.show(url, data);
},
reloadCurrentPanel: function reloadCurrentPanel() {
this.loadPanel(document.URL, null, null, true);
},
submitForm: function submitForm(form, button, callback, ajaxOptions) {
var self = this;
if (!button) button = this.find('.btn-toolbar :submit[name=action_save]');
if (!button) button = this.find('.btn-toolbar :submit:first');
form.trigger('beforesubmitform');
this.trigger('submitform', { form: form, button: button });
$(button).addClass('loading');
var validationResult = form.validate();
if (typeof validationResult !== 'undefined' && !validationResult) {
statusMessage("Validation failed.", "bad");
$(button).removeClass('loading');
return false;
}
var formData = form.serializeArray();
formData.push({ name: $(button).attr('name'), value: '1' });
formData.push({ name: 'BackURL', value: document.URL.replace(/\/$/, '') });
this.saveTabState();
jQuery.ajax(jQuery.extend({
headers: { "X-Pjax": "CurrentForm,Breadcrumbs" },
url: form.attr('action'),
data: formData,
type: 'POST',
complete: function complete() {
$(button).removeClass('loading');
},
success: function success(data, status, xhr) {
form.removeClass('changed');
if (callback) callback(data, status, xhr);
var newContentEls = self.handleAjaxResponse(data, status, xhr);
if (!newContentEls) return;
newContentEls.filter('form').trigger('aftersubmitform', { status: status, xhr: xhr, formData: formData });
}
}, ajaxOptions));
return false;
},
LastState: null,
PauseState: false,
handleStateChange: function handleStateChange(event) {
var historyState = arguments.length <= 1 || arguments[1] === undefined ? window.history.state : arguments[1];
if (this.getPauseState()) {
return;
}
if (this.getStateChangeXHR()) {
this.getStateChangeXHR().abort();
}
var self = this,
fragments = historyState.pjax || 'Content',
headers = {},
fragmentsArr = fragments.split(','),
contentEls = this._findFragments(fragmentsArr);
this.setStateChangeCount(this.getStateChangeCount() + 1);
if (!this.checkCanNavigate()) {
var lastState = this.getLastState();
this.setPauseState(true);
if (lastState && lastState.path) {
window.ss.router.show(lastState.path);
} else {
window.ss.router.back();
}
this.setPauseState(false);
return;
}
this.setLastState(historyState);
if (contentEls.length < fragmentsArr.length) {
fragments = 'Content', fragmentsArr = ['Content'];
contentEls = this._findFragments(fragmentsArr);
}
this.trigger('beforestatechange', { state: historyState, element: contentEls });
headers['X-Pjax'] = fragments;
if (typeof historyState.__forceReferer !== 'undefined') {
var url = historyState.__forceReferer;
try {
url = decodeURI(url);
} catch (e) {} finally {
headers['X-Backurl'] = encodeURI(url);
}
}
contentEls.addClass('loading');
var promise = $.ajax({
headers: headers,
url: historyState.path || document.URL
}).done(function (data, status, xhr) {
var els = self.handleAjaxResponse(data, status, xhr, historyState);
self.trigger('afterstatechange', { data: data, status: status, xhr: xhr, element: els, state: historyState });
}).always(function () {
self.setStateChangeXHR(null);
contentEls.removeClass('loading');
});
this.setStateChangeXHR(promise);
return promise;
},
loadFragment: function loadFragment(url, pjaxFragments) {
var self = this,
xhr,
headers = {},
baseUrl = $('base').attr('href'),
fragmentXHR = this.getFragmentXHR();
if (typeof fragmentXHR[pjaxFragments] !== 'undefined' && fragmentXHR[pjaxFragments] !== null) {
fragmentXHR[pjaxFragments].abort();
fragmentXHR[pjaxFragments] = null;
}
url = $.path.isAbsoluteUrl(url) ? url : $.path.makeUrlAbsolute(url, baseUrl);
headers['X-Pjax'] = pjaxFragments;
xhr = $.ajax({
headers: headers,
url: url,
success: function success(data, status, xhr) {
var elements = self.handleAjaxResponse(data, status, xhr, null);
self.trigger('afterloadfragment', { data: data, status: status, xhr: xhr, elements: elements });
},
error: function error(xhr, status, _error) {
self.trigger('loadfragmenterror', { xhr: xhr, status: status, error: _error });
},
complete: function complete() {
var fragmentXHR = self.getFragmentXHR();
if (typeof fragmentXHR[pjaxFragments] !== 'undefined' && fragmentXHR[pjaxFragments] !== null) {
fragmentXHR[pjaxFragments] = null;
}
}
});
fragmentXHR[pjaxFragments] = xhr;
return xhr;
},
handleAjaxResponse: function handleAjaxResponse(data, status, xhr, state) {
var self = this,
url,
selectedTabs,
guessFragment,
fragment,
$data;
if (xhr.getResponseHeader('X-Reload') && xhr.getResponseHeader('X-ControllerURL')) {
var baseUrl = $('base').attr('href'),
rawURL = xhr.getResponseHeader('X-ControllerURL'),
url = $.path.isAbsoluteUrl(rawURL) ? rawURL : $.path.makeUrlAbsolute(rawURL, baseUrl);
document.location.href = url;
return;
}
if (!data) return;
var title = xhr.getResponseHeader('X-Title');
if (title) document.title = decodeURIComponent(title.replace(/\+/g, ' '));
var newFragments = {},
newContentEls;
if (xhr.getResponseHeader('Content-Type').match(/^((text)|(application))\/json[ \t]*;?/i)) {
newFragments = data;
} else {
fragment = document.createDocumentFragment();
jQuery.clean([data], document, fragment, []);
$data = $(jQuery.merge([], fragment.childNodes));
guessFragment = 'Content';
if ($data.is('form') && !$data.is('[data-pjax-fragment~=Content]')) guessFragment = 'CurrentForm';
newFragments[guessFragment] = $data;
}
this.setRedrawSuppression(true);
try {
$.each(newFragments, function (newFragment, html) {
var contentEl = $('[data-pjax-fragment]').filter(function () {
return $.inArray(newFragment, $(this).data('pjaxFragment').split(' ')) != -1;
}),
newContentEl = $(html);
if (newContentEls) newContentEls.add(newContentEl);else newContentEls = newContentEl;
if (newContentEl.find('.cms-container').length) {
throw 'Content loaded via ajax is not allowed to contain tags matching the ".cms-container" selector to avoid infinite loops';
}
var origStyle = contentEl.attr('style');
var origParent = contentEl.parent();
var origParentLayoutApplied = typeof origParent.data('jlayout') !== 'undefined';
var layoutClasses = ['east', 'west', 'center', 'north', 'south', 'column-hidden'];
var elemClasses = contentEl.attr('class');
var origLayoutClasses = [];
if (elemClasses) {
origLayoutClasses = $.grep(elemClasses.split(' '), function (val) {
return $.inArray(val, layoutClasses) >= 0;
});
}
newContentEl.removeClass(layoutClasses.join(' ')).addClass(origLayoutClasses.join(' '));
if (origStyle) newContentEl.attr('style', origStyle);
var styles = newContentEl.find('style').detach();
if (styles.length) $(document).find('head').append(styles);
contentEl.replaceWith(newContentEl);
if (!origParent.is('.cms-container') && origParentLayoutApplied) {
origParent.layout();
}
});
var newForm = newContentEls.filter('form');
if (newForm.hasClass('cms-tabset')) newForm.removeClass('cms-tabset').addClass('cms-tabset');
} finally {
this.setRedrawSuppression(false);
}
this.redraw();
this.restoreTabState(state && typeof state.tabState !== 'undefined' ? state.tabState : null);
return newContentEls;
},
_findFragments: function _findFragments(fragments) {
return $('[data-pjax-fragment]').filter(function () {
var i,
nodeFragments = $(this).data('pjaxFragment').split(' ');
for (i in fragments) {
if ($.inArray(fragments[i], nodeFragments) != -1) return true;
}
return false;
});
},
refresh: function refresh() {
$(window).trigger('statechange');
$(this).redraw();
},
saveTabState: function saveTabState() {
if (typeof window.sessionStorage == "undefined" || window.sessionStorage === null) return;
var selectedTabs = [],
url = this._tabStateUrl();
this.find('.cms-tabset,.ss-tabset').each(function (i, el) {
var id = $(el).attr('id');
if (!id) return;
if (!$(el).data('tabs')) return;
if ($(el).data('ignoreTabState') || $(el).getIgnoreTabState()) return;
selectedTabs.push({ id: id, selected: $(el).tabs('option', 'selected') });
});
if (selectedTabs) {
var tabsUrl = 'tabs-' + url;
try {
window.sessionStorage.setItem(tabsUrl, JSON.stringify(selectedTabs));
} catch (err) {
if (err.code === DOMException.QUOTA_EXCEEDED_ERR && window.sessionStorage.length === 0) {
return;
} else {
throw err;
}
}
}
},
restoreTabState: function restoreTabState(overrideStates) {
var self = this,
url = this._tabStateUrl(),
hasSessionStorage = typeof window.sessionStorage !== "undefined" && window.sessionStorage,
sessionData = hasSessionStorage ? window.sessionStorage.getItem('tabs-' + url) : null,
sessionStates = sessionData ? JSON.parse(sessionData) : false;
this.find('.cms-tabset, .ss-tabset').each(function () {
var index,
tab,
tabset = $(this),
tabsetId = tabset.attr('id'),
forcedTab = tabset.children('ul').children('li.ss-tabs-force-active');
if (!tabset.data('tabs')) {
return;
}
tabset.tabs('refresh');
if (forcedTab.length) {
index = forcedTab.first().index();
} else if (overrideStates && overrideStates[tabsetId]) {
tab = tabset.find(overrideStates[tabsetId].tabSelector);
if (tab.length) {
index = tab.index();
}
} else if (sessionStates) {
$.each(sessionStates, function (i, state) {
if (tabsetId == state.id) {
index = state.selected;
}
});
}
if (index !== null) {
tabset.tabs('option', 'active', index);
self.trigger('tabstaterestored');
}
});
},
clearTabState: function clearTabState(url) {
if (typeof window.sessionStorage == "undefined") return;
var s = window.sessionStorage;
if (url) {
s.removeItem('tabs-' + url);
} else {
for (var i = 0; i < s.length; i++) {
if (s.key(i).match(/^tabs-/)) s.removeItem(s.key(i));
}
}
},
clearCurrentTabState: function clearCurrentTabState() {
this.clearTabState(this._tabStateUrl());
},
_tabStateUrl: function _tabStateUrl() {
return window.location.href.replace(/\?.*/, '').replace(/#.*/, '').replace($('base').attr('href'), '');
},
showLoginDialog: function showLoginDialog() {
var tempid = $('body').data('member-tempid'),
dialog = $('.leftandmain-logindialog'),
url = 'CMSSecurity/login';
if (dialog.length) dialog.remove();
url = $.path.addSearchParams(url, {
'tempid': tempid,
'BackURL': window.location.href
});
dialog = $('<div class="leftandmain-logindialog"></div>');
dialog.attr('id', new Date().getTime());
dialog.data('url', url);
$('body').append(dialog);
}
});
$('.leftandmain-logindialog').entwine({
onmatch: function onmatch() {
this._super();
this.ssdialog({
iframeUrl: this.data('url'),
dialogClass: "leftandmain-logindialog-dialog",
autoOpen: true,
minWidth: 500,
maxWidth: 500,
minHeight: 370,
maxHeight: 400,
closeOnEscape: false,
open: function open() {
$('.ui-widget-overlay').addClass('leftandmain-logindialog-overlay');
},
close: function close() {
$('.ui-widget-overlay').removeClass('leftandmain-logindialog-overlay');
}
});
},
onunmatch: function onunmatch() {
this._super();
},
open: function open() {
this.ssdialog('open');
},
close: function close() {
this.ssdialog('close');
},
toggle: function toggle(bool) {
if (this.is(':visible')) this.close();else this.open();
},
reauthenticate: function reauthenticate(data) {
if (typeof data.SecurityID !== 'undefined') {
$(':input[name=SecurityID]').val(data.SecurityID);
}
if (typeof data.TempID !== 'undefined') {
$('body').data('member-tempid', data.TempID);
}
this.close();
}
});
$('form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading').entwine({
onmatch: function onmatch() {
this.append('<div class="cms-content-loading-overlay ui-widget-overlay-light"></div><div class="cms-content-loading-spinner"></div>');
this._super();
},
onunmatch: function onunmatch() {
this.find('.cms-content-loading-overlay,.cms-content-loading-spinner').remove();
this._super();
}
});
$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({
onadd: function onadd() {
this.addClass('ss-ui-button');
if (!this.data('button')) this.button();
this._super();
},
onremove: function onremove() {
if (this.data('button')) this.button('destroy');
this._super();
}
});
$('.cms .cms-panel-link').entwine({
onclick: function onclick(e) {
if ($(this).hasClass('external-link')) {
e.stopPropagation();
return;
}
var href = this.attr('href'),
url = href && !href.match(/^#/) ? href : this.data('href'),
data = { pjax: this.data('pjaxTarget') };
$('.cms-container').loadPanel(url, null, data);
e.preventDefault();
}
});
$('.cms .ss-ui-button-ajax').entwine({
onclick: function onclick(e) {
$(this).removeClass('ui-button-text-only');
$(this).addClass('ss-ui-button-loading ui-button-text-icons');
var loading = $(this).find(".ss-ui-loading-icon");
if (loading.length < 1) {
loading = $("<span></span>").addClass('ss-ui-loading-icon ui-button-icon-primary ui-icon');
$(this).prepend(loading);
}
loading.show();
var href = this.attr('href'),
url = href ? href : this.data('href');
jQuery.ajax({
url: url,
complete: function complete(xmlhttp, status) {
var msg = xmlhttp.getResponseHeader('X-Status') ? xmlhttp.getResponseHeader('X-Status') : xmlhttp.responseText;
try {
if (typeof msg != "undefined" && msg !== null) eval(msg);
} catch (e) {}
loading.hide();
$(".cms-container").refresh();
$(this).removeClass('ss-ui-button-loading ui-button-text-icons');
$(this).addClass('ui-button-text-only');
},
dataType: 'html'
});
e.preventDefault();
}
});
$('.cms .ss-ui-dialog-link').entwine({
UUID: null,
onmatch: function onmatch() {
this._super();
this.setUUID(new Date().getTime());
},
onunmatch: function onunmatch() {
this._super();
},
onclick: function onclick() {
this._super();
var self = this,
id = 'ss-ui-dialog-' + this.getUUID();
var dialog = $('#' + id);
if (!dialog.length) {
dialog = $('<div class="ss-ui-dialog" id="' + id + '" />');
$('body').append(dialog);
}
var extraClass = this.data('popupclass') ? this.data('popupclass') : '';
dialog.ssdialog({ iframeUrl: this.attr('href'), autoOpen: true, dialogExtraClass: extraClass });
return false;
}
});
$('.cms-content .btn-toolbar').entwine({
onmatch: function onmatch() {
this.find('.ss-ui-button').click(function () {
var form = this.form;
if (form) {
form.clickedButton = this;
setTimeout(function () {
form.clickedButton = null;
}, 10);
}
});
this.redraw();
this._super();
},
onunmatch: function onunmatch() {
this._super();
},
redraw: function redraw() {
if (window.debug) console.log('redraw', this.attr('class'), this.get(0));
this.contents().filter(function () {
return this.nodeType == 3 && !/\S/.test(this.nodeValue);
}).remove();
this.find('.ss-ui-button').each(function () {
if (!$(this).data('button')) $(this).button();
});
this.find('.ss-ui-buttonset').buttonset();
}
});
$('.cms .field.date input.text').entwine({
onmatch: function onmatch() {
var holder = $(this).parents('.field.date:first'),
config = holder.data();
if (!config.showcalendar) {
this._super();
return;
}
config.showOn = 'button';
if (config.locale && $.datepicker.regional[config.locale]) {
config = $.extend(config, $.datepicker.regional[config.locale], {});
}
if (!this.prop('disabled') && !this.prop('readonly')) {
$(this).datepicker(config);
}
this._super();
},
onunmatch: function onunmatch() {
this._super();
}
});
$('.cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown').entwine({
onmatch: function onmatch() {
if (this.is('.no-chosen')) {
this._super();
return;
}
if (!this.data('placeholder')) this.data('placeholder', ' ');
this.removeClass('has-chosen').chosen("destroy");
this.siblings('.chosen-container').remove();
applyChosen(this);
this._super();
},
onunmatch: function onunmatch() {
this._super();
}
});
$(".cms-panel-layout").entwine({
redraw: function redraw() {
if (window.debug) console.log('redraw', this.attr('class'), this.get(0));
}
});
$('.cms .grid-field').entwine({
showDetailView: function showDetailView(url) {
var params = window.location.search.replace(/^\?/, '');
if (params) url = $.path.addSearchParams(url, params);
$('.cms-container').loadPanel(url);
}
});
$('.cms-search-form').entwine({
onsubmit: function onsubmit(e) {
var nonEmptyInputs, url;
nonEmptyInputs = this.find(':input:not(:submit)').filter(function () {
var vals = $.grep($(this).fieldValue(), function (val) {
return val;
});
return vals.length;
});
url = this.attr('action');
if (nonEmptyInputs.length) {
url = $.path.addSearchParams(url, nonEmptyInputs.serialize().replace('+', '%20'));
}
var container = this.closest('.cms-container');
container.find('.cms-edit-form').tabs('select', 0);
container.loadPanel(url, "", {}, true);
return false;
}
});
$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({
onclick: function onclick(e) {
e.preventDefault();
var form = $(this).parents('form');
form.clearForm();
form.find(".dropdown select").prop('selectedIndex', 0).trigger("chosen:updated");
form.submit();
}
});
window._panelDeferredCache = {};
$('.cms-panel-deferred').entwine({
onadd: function onadd() {
this._super();
this.redraw();
},
onremove: function onremove() {
if (window.debug) console.log('saving', this.data('url'), this);
if (!this.data('deferredNoCache')) window._panelDeferredCache[this.data('url')] = this.html();
this._super();
},
redraw: function redraw() {
if (window.debug) console.log('redraw', this.attr('class'), this.get(0));
var self = this,
url = this.data('url');
if (!url) throw 'Elements of class .cms-panel-deferred need a "data-url" attribute';
this._super();
if (!this.children().length) {
if (!this.data('deferredNoCache') && typeof window._panelDeferredCache[url] !== 'undefined') {
this.html(window._panelDeferredCache[url]);
} else {
this.addClass('loading');
$.ajax({
url: url,
complete: function complete() {
self.removeClass('loading');
},
success: function success(data, status, xhr) {
self.html(data);
}
});
}
}
}
});
$('.cms-tabset').entwine({
onadd: function onadd() {
this.redrawTabs();
this._super();
},
onremove: function onremove() {
if (this.data('tabs')) this.tabs('destroy');
this._super();
},
redrawTabs: function redrawTabs() {
this.rewriteHashlinks();
var id = this.attr('id'),
activeTab = this.find('ul:first .ui-tabs-active');
if (!this.data('uiTabs')) this.tabs({
active: activeTab.index() != -1 ? activeTab.index() : 0,
beforeLoad: function beforeLoad(e, ui) {
return false;
},
activate: function activate(e, ui) {
var actions = $(this).closest('form').find('.btn-toolbar');
if ($(ui.newTab).closest('li').hasClass('readonly')) {
actions.fadeOut();
} else {
actions.show();
}
}
});
this.trigger('afterredrawtabs');
},
rewriteHashlinks: function rewriteHashlinks() {
$(this).find('ul a').each(function () {
if (!$(this).attr('href')) return;
var matches = $(this).attr('href').match(/#.*/);
if (!matches) return;
$(this).attr('href', document.location.href.replace(/#.*/, '') + matches[0]);
});
}
});
$('#filters-button').entwine({
onmatch: function onmatch() {
this._super();
this.data('collapsed', true);
this.data('animating', false);
},
onunmatch: function onunmatch() {
this._super();
},
showHide: function showHide() {
var self = this,
$filters = $('.cms-content-filters').first(),
collapsed = this.data('collapsed');
if (this.data('animating')) {
return;
}
this.toggleClass('active');
this.data('animating', true);
$filters[collapsed ? 'slideDown' : 'slideUp']({
complete: function complete() {
self.data('collapsed', !collapsed);
self.data('animating', false);
}
});
},
onclick: function onclick() {
this.showHide();
}
});
});
var statusMessage = function statusMessage(text, type) {
text = jQuery('<div/>').text(text).html();
jQuery.noticeAdd({ text: text, type: type, stayTime: 5000, inEffect: { left: '0', opacity: 'show' } });
};
});

View File

@ -1,40 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.MemberDatetimeOptionsetField', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssMemberDatetimeOptionsetField = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.entwine('ss', function ($) {
$('.memberdatetimeoptionset').entwine({
onmatch: function onmatch() {
this.find('.toggle-content').hide();
this._super();
}
});
$('.memberdatetimeoptionset .toggle').entwine({
onclick: function onclick(e) {
jQuery(this).closest('.form__field-description').parent().find('.toggle-content').toggle();
return false;
}
});
});
});

View File

@ -1,197 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.sspath', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssSspath = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var $window = (0, _jQuery2.default)(window),
$html = (0, _jQuery2.default)('html'),
$head = (0, _jQuery2.default)('head'),
path = {
urlParseRE: /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,
parseUrl: function parseUrl(url) {
if (_jQuery2.default.type(url) === "object") {
return url;
}
var matches = path.urlParseRE.exec(url || "") || [];
return {
href: matches[0] || "",
hrefNoHash: matches[1] || "",
hrefNoSearch: matches[2] || "",
domain: matches[3] || "",
protocol: matches[4] || "",
doubleSlash: matches[5] || "",
authority: matches[6] || "",
username: matches[8] || "",
password: matches[9] || "",
host: matches[10] || "",
hostname: matches[11] || "",
port: matches[12] || "",
pathname: matches[13] || "",
directory: matches[14] || "",
filename: matches[15] || "",
search: matches[16] || "",
hash: matches[17] || ""
};
},
makePathAbsolute: function makePathAbsolute(relPath, absPath) {
if (relPath && relPath.charAt(0) === "/") {
return relPath;
}
relPath = relPath || "";
absPath = absPath ? absPath.replace(/^\/|(\/[^\/]*|[^\/]+)$/g, "") : "";
var absStack = absPath ? absPath.split("/") : [],
relStack = relPath.split("/");
for (var i = 0; i < relStack.length; i++) {
var d = relStack[i];
switch (d) {
case ".":
break;
case "..":
if (absStack.length) {
absStack.pop();
}
break;
default:
absStack.push(d);
break;
}
}
return "/" + absStack.join("/");
},
isSameDomain: function isSameDomain(absUrl1, absUrl2) {
return path.parseUrl(absUrl1).domain === path.parseUrl(absUrl2).domain;
},
isRelativeUrl: function isRelativeUrl(url) {
return path.parseUrl(url).protocol === "";
},
isAbsoluteUrl: function isAbsoluteUrl(url) {
return path.parseUrl(url).protocol !== "";
},
makeUrlAbsolute: function makeUrlAbsolute(relUrl, absUrl) {
if (!path.isRelativeUrl(relUrl)) {
return relUrl;
}
var relObj = path.parseUrl(relUrl),
absObj = path.parseUrl(absUrl),
protocol = relObj.protocol || absObj.protocol,
doubleSlash = relObj.protocol ? relObj.doubleSlash : relObj.doubleSlash || absObj.doubleSlash,
authority = relObj.authority || absObj.authority,
hasPath = relObj.pathname !== "",
pathname = path.makePathAbsolute(relObj.pathname || absObj.filename, absObj.pathname),
search = relObj.search || !hasPath && absObj.search || "",
hash = relObj.hash;
return protocol + doubleSlash + authority + pathname + search + hash;
},
addSearchParams: function addSearchParams(url, params) {
var u = path.parseUrl(url),
params = typeof params === "string" ? path.convertSearchToArray(params) : params,
newParams = _jQuery2.default.extend(path.convertSearchToArray(u.search), params);
return u.hrefNoSearch + '?' + _jQuery2.default.param(newParams) + (u.hash || "");
},
getSearchParams: function getSearchParams(url) {
var u = path.parseUrl(url);
return path.convertSearchToArray(u.search);
},
convertSearchToArray: function convertSearchToArray(search) {
var parts,
i,
tmp,
params = {};
search = search.replace(/^\?/, '');
parts = search ? search.split('&') : [];
for (i = 0; i < parts.length; i++) {
tmp = parts[i].split('=');
params[decodeURIComponent(tmp[0])] = decodeURIComponent(tmp[1]);
}
return params;
},
convertUrlToDataUrl: function convertUrlToDataUrl(absUrl) {
var u = path.parseUrl(absUrl);
if (path.isEmbeddedPage(u)) {
return u.hash.split(dialogHashKey)[0].replace(/^#/, "");
} else if (path.isSameDomain(u, document)) {
return u.hrefNoHash.replace(document.domain, "");
}
return absUrl;
},
get: function get(newPath) {
if (newPath === undefined) {
newPath = location.hash;
}
return path.stripHash(newPath).replace(/[^\/]*\.[^\/*]+$/, '');
},
getFilePath: function getFilePath(path) {
var splitkey = '&' + _jQuery2.default.mobile.subPageUrlKey;
return path && path.split(splitkey)[0].split(dialogHashKey)[0];
},
set: function set(path) {
location.hash = path;
},
isPath: function isPath(url) {
return (/\//.test(url)
);
},
clean: function clean(url) {
return url.replace(document.domain, "");
},
stripHash: function stripHash(url) {
return url.replace(/^#/, "");
},
cleanHash: function cleanHash(hash) {
return path.stripHash(hash.replace(/\?.*$/, "").replace(dialogHashKey, ""));
},
isExternal: function isExternal(url) {
var u = path.parseUrl(url);
return u.protocol && u.domain !== document.domain ? true : false;
},
hasProtocol: function hasProtocol(url) {
return (/^(:?\w+:)/.test(url)
);
}
};
_jQuery2.default.path = path;
});

View File

@ -1,261 +0,0 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.ssui.core', ['jQuery'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jQuery'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery);
global.ssSsuiCore = mod.exports;
}
})(this, function (_jQuery) {
'use strict';
var _jQuery2 = _interopRequireDefault(_jQuery);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_jQuery2.default.widget('ssui.button', _jQuery2.default.ui.button, {
options: {
alternate: {
icon: null,
text: null
},
showingAlternate: false
},
toggleAlternate: function toggleAlternate() {
if (this._trigger('ontogglealternate') === false) return;
if (!this.options.alternate.icon && !this.options.alternate.text) return;
this.options.showingAlternate = !this.options.showingAlternate;
this.refresh();
},
_refreshAlternate: function _refreshAlternate() {
this._trigger('beforerefreshalternate');
if (!this.options.alternate.icon && !this.options.alternate.text) return;
if (this.options.showingAlternate) {
this.element.find('.ui-button-icon-primary').hide();
this.element.find('.ui-button-text').hide();
this.element.find('.ui-button-icon-alternate').show();
this.element.find('.ui-button-text-alternate').show();
} else {
this.element.find('.ui-button-icon-primary').show();
this.element.find('.ui-button-text').show();
this.element.find('.ui-button-icon-alternate').hide();
this.element.find('.ui-button-text-alternate').hide();
}
this._trigger('afterrefreshalternate');
},
_resetButton: function _resetButton() {
var iconPrimary = this.element.data('icon-primary'),
iconSecondary = this.element.data('icon-secondary');
if (!iconPrimary) iconPrimary = this.element.data('icon');
if (iconPrimary) this.options.icons.primary = 'btn-icon-' + iconPrimary;
if (iconSecondary) this.options.icons.secondary = 'btn-icon-' + iconSecondary;
_jQuery2.default.ui.button.prototype._resetButton.call(this);
if (!this.options.alternate.text) {
this.options.alternate.text = this.element.data('text-alternate');
}
if (!this.options.alternate.icon) {
this.options.alternate.icon = this.element.data('icon-alternate');
}
if (!this.options.showingAlternate) {
this.options.showingAlternate = this.element.hasClass('ss-ui-alternate');
}
if (this.options.alternate.icon) {
this.buttonElement.append("<span class='ui-button-icon-alternate ui-button-icon-primary ui-icon btn-icon-" + this.options.alternate.icon + "'></span>");
}
if (this.options.alternate.text) {
this.buttonElement.append("<span class='ui-button-text-alternate ui-button-text'>" + this.options.alternate.text + "</span>");
}
this._refreshAlternate();
},
refresh: function refresh() {
_jQuery2.default.ui.button.prototype.refresh.call(this);
this._refreshAlternate();
},
destroy: function destroy() {
this.element.find('.ui-button-text-alternate').remove();
this.element.find('.ui-button-icon-alternate').remove();
_jQuery2.default.ui.button.prototype.destroy.call(this);
}
});
_jQuery2.default.widget("ssui.ssdialog", _jQuery2.default.ui.dialog, {
options: {
iframeUrl: '',
reloadOnOpen: true,
dialogExtraClass: '',
modal: true,
bgiframe: true,
autoOpen: false,
autoPosition: true,
minWidth: 500,
maxWidth: 800,
minHeight: 300,
maxHeight: 700,
widthRatio: 0.8,
heightRatio: 0.8,
resizable: false
},
_create: function _create() {
_jQuery2.default.ui.dialog.prototype._create.call(this);
var self = this;
var iframe = (0, _jQuery2.default)('<iframe marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto"></iframe>');
iframe.bind('load', function (e) {
if ((0, _jQuery2.default)(this).attr('src') == 'about:blank') return;
iframe.addClass('loaded').show();
self._resizeIframe();
self.uiDialog.removeClass('loading');
}).hide();
if (this.options.dialogExtraClass) this.uiDialog.addClass(this.options.dialogExtraClass);
this.element.append(iframe);
if (this.options.iframeUrl) this.element.css('overflow', 'hidden');
},
open: function open() {
_jQuery2.default.ui.dialog.prototype.open.call(this);
var self = this,
iframe = this.element.children('iframe');
if (this.options.iframeUrl && (!iframe.hasClass('loaded') || this.options.reloadOnOpen)) {
iframe.hide();
iframe.attr('src', this.options.iframeUrl);
this.uiDialog.addClass('loading');
}
(0, _jQuery2.default)(window).bind('resize.ssdialog', function () {
self._resizeIframe();
});
},
close: function close() {
_jQuery2.default.ui.dialog.prototype.close.call(this);
this.uiDialog.unbind('resize.ssdialog');
(0, _jQuery2.default)(window).unbind('resize.ssdialog');
},
_resizeIframe: function _resizeIframe() {
var opts = {},
newWidth,
newHeight,
iframe = this.element.children('iframe');;
if (this.options.widthRatio) {
newWidth = (0, _jQuery2.default)(window).width() * this.options.widthRatio;
if (this.options.minWidth && newWidth < this.options.minWidth) {
opts.width = this.options.minWidth;
} else if (this.options.maxWidth && newWidth > this.options.maxWidth) {
opts.width = this.options.maxWidth;
} else {
opts.width = newWidth;
}
}
if (this.options.heightRatio) {
newHeight = (0, _jQuery2.default)(window).height() * this.options.heightRatio;
if (this.options.minHeight && newHeight < this.options.minHeight) {
opts.height = this.options.minHeight;
} else if (this.options.maxHeight && newHeight > this.options.maxHeight) {
opts.height = this.options.maxHeight;
} else {
opts.height = newHeight;
}
}
if (!jQuery.isEmptyObject(opts)) {
this._setOptions(opts);
iframe.attr('width', opts.width - parseFloat(this.element.css('paddingLeft')) - parseFloat(this.element.css('paddingRight')));
iframe.attr('height', opts.height - parseFloat(this.element.css('paddingTop')) - parseFloat(this.element.css('paddingBottom')));
if (this.options.autoPosition) {
this._setOption("position", this.options.position);
}
}
}
});
_jQuery2.default.widget("ssui.titlebar", {
_create: function _create() {
this.originalTitle = this.element.attr('title');
var self = this;
var options = this.options;
var title = options.title || this.originalTitle || '&nbsp;';
var titleId = _jQuery2.default.ui.dialog.getTitleId(this.element);
this.element.parent().addClass('ui-dialog');
var uiDialogTitlebar = this.element.addClass('ui-dialog-titlebar ' + 'ui-widget-header ' + 'ui-corner-all ' + 'ui-helper-clearfix');
if (options.closeButton) {
var uiDialogTitlebarClose = (0, _jQuery2.default)('<a href="#"/>').addClass('ui-dialog-titlebar-close ' + 'ui-corner-all').attr('role', 'button').hover(function () {
uiDialogTitlebarClose.addClass('ui-state-hover');
}, function () {
uiDialogTitlebarClose.removeClass('ui-state-hover');
}).focus(function () {
uiDialogTitlebarClose.addClass('ui-state-focus');
}).blur(function () {
uiDialogTitlebarClose.removeClass('ui-state-focus');
}).mousedown(function (ev) {
ev.stopPropagation();
}).appendTo(uiDialogTitlebar);
var uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = (0, _jQuery2.default)('<span/>')).addClass('ui-icon ' + 'ui-icon-closethick').text(options.closeText).appendTo(uiDialogTitlebarClose);
}
var uiDialogTitle = (0, _jQuery2.default)('<span/>').addClass('ui-dialog-title').attr('id', titleId).html(title).prependTo(uiDialogTitlebar);
uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
},
destroy: function destroy() {
this.element.unbind('.dialog').removeData('dialog').removeClass('ui-dialog-content ui-widget-content').hide().appendTo('body');
this.originalTitle && this.element.attr('title', this.originalTitle);
}
});
_jQuery2.default.extend(_jQuery2.default.ssui.titlebar, {
version: "0.0.1",
options: {
title: '',
closeButton: false,
closeText: 'close'
},
uuid: 0,
getTitleId: function getTitleId($el) {
return 'ui-dialog-title-' + ($el.attr('id') || ++this.uuid);
}
});
});

View File

@ -12,4 +12,17 @@ require('../legacy/LeftAndMain.FieldHelp.js');
require('../legacy/LeftAndMain.FieldDescriptionToggle.js');
require('../legacy/LeftAndMain.TreeDropdownField.js');
require('../legacy/AddToCampaignForm.js');
require('../legacy/SecurityAdmin.js');
// Fields used by core legacy UIs, or available to users
// To do: determine better way of using webpack to pull in optional javascript
require('../../../../client/src/legacy/AssetUploadField.js');
require('../../../../client/src/legacy/ConfirmedPasswordField.js');
require('../../../../client/src/legacy/UploadField.js');
require('../../../../client/src/legacy/SelectionGroup.js');
require('../../../../client/src/legacy/DateField.js');
require('../../../../client/src/legacy/ToggleCompositeField.js');
require('../legacy/MemberDatetimeOptionsetField.js');
require('../../../../client/src/styles/legacy/CheckboxSetField.scss');
require('../../../../client/src/styles/legacy/DatetimeField.scss');

View File

@ -1,23 +1,92 @@
// Expose the libraries as globals for other modules to access
// Note that these are order-dependent - earlier items should not depend on later ones
require('expose?DeepFreezeStrict!deep-freeze-strict');
require('expose?React!react');
require('expose?Tether!tether');
require('expose?ReactDom!react-dom');
require('expose?Redux!redux');
require('expose?ReactRedux!react-redux');
require('expose?ReduxThunk!redux-thunk');
require('expose?ReactRouter!react-router');
require('expose?ReactRouterRedux!react-router-redux');
// jQuery plugins require that the jQuery object is exposed as a global
// webpack.ProvidePlugin is used to ensure that jQuery and $ are provided to all includes
require('script!../../../../thirdparty/jquery/jquery.js');
require('expose?jQuery!jQuery');
require('expose?ReactBootstrap!react-bootstrap-ss');
require('expose?ReactAddonsCssTransitionGroup!react-addons-css-transition-group');
require('expose?ReactAddonsTestUtils!react-addons-test-utils');
require('expose?Page!page.js');
require('expose?BootstrapCollapse!bootstrap/dist/js/umd/collapse.js');
require('i18n.js');
require('expose?i18nx!i18nx.js');
require('babel-polyfill');
require('../../../../thirdparty/jquery/jquery.js');
require('../../../../thirdparty/jquery-ondemand/jquery.ondemand.js');
require('../legacy/sspath.js');
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
require('../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
require('../legacy/sspath.js');
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
require('../../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
require('../../../../thirdparty/jquery-cookie/jquery.cookie.js');
require('../../../../thirdparty/jquery-query/jquery.query.js');
require('../../../../thirdparty/jquery-form/jquery.form.js');
require('../../../thirdparty/jquery-notice/jquery.notice.js');
require('../../../thirdparty/jquery-notice/jquery.notice.css');
require('../../../thirdparty/jsizes/lib/jquery.sizes.js');
require('../../../thirdparty/jlayout/lib/jlayout.border.js');
require('../../../thirdparty/jlayout/lib/jquery.jlayout.js');
require('../../../../thirdparty/jstree/jquery.jstree.js');
require('../../../../thirdparty//jstree/themes/apple/style.css');
require('../../../thirdparty/jquery-hoverIntent/jquery.hoverIntent.js');
require('../../../../thirdparty/jquery-changetracker/lib/jquery.changetracker.js');
require('../../../../client/src/legacy/TreeDropdownField.js');
require('../../../../client/src/legacy/DateField.js');
require('../../../../client/src/legacy/HtmlEditorField.js');
require('../../../../client/src/legacy/TabSet.js');
require('../legacy/ssui.core.js');
require('../../../../client/src/legacy/GridField.js');
require('json-js');
require('expose?SilverStripeComponent!lib/SilverStripeComponent');
require('expose?Backend!lib/Backend');
require('expose?Form!components/Form/Form');
require('expose?FormConstants!components/Form/FormConstants');
require('expose?FormAction!components/FormAction/FormAction');
require('expose?FormBuilder!components/FormBuilder/FormBuilder');
require('expose?FormBuilderModal!components/FormBuilderModal/FormBuilderModal');
require('expose?GridField!components/GridField/GridField');
require('expose?GridFieldCell!components/GridField/GridFieldCell');
require('expose?GridFieldHeader!components/GridField/GridFieldHeader');
require('expose?GridFieldHeaderCell!components/GridField/GridFieldHeaderCell');
require('expose?GridFieldRow!components/GridField/GridFieldRow');
require('expose?GridFieldTable!components/GridField/GridFieldTable');
require('expose?HiddenField!components/HiddenField/HiddenField');
require('expose?TextField!components/TextField/TextField');
require('expose?Toolbar!components/Toolbar/Toolbar');
require('expose?Breadcrumb!components/Breadcrumb/Breadcrumb');
require('expose?BreadcrumbsActions!state/breadcrumbs/BreadcrumbsActions');
require('expose?Config!lib/Config');
require('expose?ReducerRegister!lib/ReducerRegister');
require('expose?ReactRouteRegister!lib/ReactRouteRegister');
require('expose?Injector!lib/Injector');
require('expose?Router!lib/Router');
// Chosen is manually compiled from its support files
// Loaded into global state as I don't know how to chain the exports loader into the argument
// of the imports loader
require('expose?AbstractChosen!exports?AbstractChosen!chosen/coffee/lib/abstract-chosen.coffee');
require('expose?SelectParser!exports?SelectParser!chosen/coffee/lib/select-parser.coffee');
require('chosen/coffee/chosen.jquery.coffee');
// Ensure that styles are built as part of this webpack bundle
require('../styles/bundle.scss');

View File

@ -3,6 +3,8 @@
*/
import $ from 'jQuery';
require('../../../../admin/client/src/legacy/ssui.core.js');
var windowWidth, windowHeight;
$.noConflict();

View File

@ -3,6 +3,8 @@
*/
import $ from 'jQuery';
require('../../../../client/src/legacy/PermissionCheckboxSetField.js');
var refreshAfterImport = function(e) {
// Check for a message <div>, an indication that the form has been submitted.
var existingFormMessage = $($(this).contents()).find('.message');

View File

@ -1,5 +1,7 @@
import $ from 'jQuery';
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
/**
* Allows icon definition via HTML5 data attrs for easier handling in PHP.
*

View File

@ -1,4 +1,5 @@
$chosen-sprite: url("../images/chosen-sprite.png");
$chosen-sprite-retina: url("../images/chosen-sprite@2x.png");
@import "../../../../client/src/styles/_compasscompat";
@import "../../../../node_modules/chosen/sass/chosen";

View File

@ -536,52 +536,10 @@ class LeftAndMain extends Controller implements PermissionProvider {
window.ss.config = " . $this->getCombinedClientConfig() . ";
");
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/bundle-lib.js', [
'provides' => [
THIRDPARTY_DIR . '/jquery/jquery.js',
THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js',
THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js',
THIRDPARTY_DIR . '/jquery-cookie/jquery.cookie.js',
THIRDPARTY_DIR . '/jquery-query/jquery.query.js',
THIRDPARTY_DIR . '/jquery-form/jquery.form.js',
THIRDPARTY_DIR . '/jquery-ondemand/jquery.ondemand.js',
THIRDPARTY_DIR . '/jquery-changetracker/lib/jquery.changetracker.js',
THIRDPARTY_DIR . '/jstree/jquery.jstree.js',
FRAMEWORK_ADMIN_DIR . '/thirdparty/jquery-notice/jquery.notice.js',
FRAMEWORK_ADMIN_DIR . '/thirdparty/jsizes/lib/jquery.sizes.js',
FRAMEWORK_ADMIN_DIR . '/thirdparty/jlayout/lib/jlayout.border.js',
FRAMEWORK_ADMIN_DIR . '/thirdparty/jlayout/lib/jquery.jlayout.js',
FRAMEWORK_ADMIN_DIR . '/thirdparty/chosen/chosen/chosen.jquery.js',
FRAMEWORK_ADMIN_DIR . '/thirdparty/jquery-hoverIntent/jquery.hoverIntent.js',
FRAMEWORK_DIR . '/client/dist/js/TreeDropdownField.js',
FRAMEWORK_DIR . '/client/dist/js/DateField.js',
FRAMEWORK_DIR . '/client/dist/js/HtmlEditorField.js',
FRAMEWORK_DIR . '/client/dist/js/TabSet.js',
FRAMEWORK_DIR . '/client/dist/js/GridField.js',
FRAMEWORK_DIR . '/client/dist/js/i18n.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/sspath.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/ssui.core.js'
]
]);
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/bundle-lib.js');
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/style/bundle.css');
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/bundle-legacy.js', [
'provides' => [
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.Layout.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.ActionTabSet.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.Panel.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.Tree.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.Content.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.EditForm.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.Menu.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.Preview.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.BatchActions.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.FieldHelp.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.FieldDescriptionToggle.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/LeftAndMain.TreeDropdownField.js',
FRAMEWORK_ADMIN_DIR . '/client/dist/js/AddToCampaignForm.js'
]
]);
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/bundle-legacy.js');
Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/client/lang', false, true);
Requirements::add_i18n_javascript(FRAMEWORK_ADMIN_DIR . '/client/lang', false, true);
@ -598,13 +556,6 @@ class LeftAndMain extends Controller implements PermissionProvider {
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/bundle-framework.js');
Requirements::css(FRAMEWORK_ADMIN_DIR . '/thirdparty/jquery-notice/jquery.notice.css');
Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
Requirements::css(THIRDPARTY_DIR . '/jstree/themes/apple/style.css');
Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/TreeDropdownField.css');
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/styles/bundle.css');
Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/GridField.css');
// Custom requirements
$extraJs = $this->stat('extra_requirements_javascript');

View File

@ -71,8 +71,9 @@ class MemberImportForm extends Form {
parent::__construct($controller, $name, $fields, $actions, $validator);
Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/bundle-lib.js');
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/MemberImportForm.js');
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/style/bundle.css');
$this->addExtraClass('cms');
$this->addExtraClass('import-form');

View File

@ -238,10 +238,10 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
public function memberimport() {
Requirements::clear();
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/styles/bundle.css');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/bundle-lib.js');
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/MemberImportForm.js');
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/style/bundle.css');
return $this->renderWith('BlankPage', array(
'Form' => $this->MemberImportForm()->forTemplate(),
'Content' => ' '
@ -272,10 +272,10 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
public function groupimport() {
Requirements::clear();
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/styles/bundle.css');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/bundle-lib.js');
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/MemberImportForm.js');
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/style/bundle.css');
return $this->renderWith('BlankPage', array(
'Content' => ' ',
'Form' => $this->GroupImportForm()->forTemplate()

View File

@ -1,3 +1 @@
body{background:#eee !important;margin:0;overflow-x:hidden;padding:0;font-family:Helvetica,Arial,sans-serif}.info{margin:0 0 6px 0;padding:18px;background-color:#003050;position:relative;line-height:24px;color:#fff;background-image:-webkit-gradient(linear, left top, left bottom, from(#002137), color-stop(10%, #003050), color-stop(90%, #003050), color-stop(90%, #002137));background-image:-webkit-linear-gradient(#002137, #003050 10%, #003050 90%, #002137);background-image:-o-linear-gradient(#002137, #003050 10%, #003050 90%, #002137);background-image:linear-gradient(#002137, #003050 10%, #003050 90%, #002137);z-index:9999}.info h1{margin:0 0 6px 0;padding:0 32px 0 0;color:#fff;font-size:24px;text-shadow:0 1px #002137;line-height:30px;background:url(../../admin/client/dist/images/logo_small.png) no-repeat right 3px}.info h3{color:#7da4be;font-size:16px;line-height:18px;font-weight:normal}.info p{margin:0;font-size:14px;color:#fff}.info a{color:#fff;font-weight:bold;text-decoration:none}.info a:hover,.info a:active{color:#fff;text-decoration:underline}.header{margin:0;border-bottom:6px solid #ccdef3;height:23px;background-color:#666673;padding:4px 0 2px 6px}.trace,.build,.options{padding:6px 12px;background:#eee !important;position:relative;z-index:9999}.trace li,.build li,.options li{font-size:14px;margin:6px 0}a{color:#666}a:hover{color:#222}a:active{color:#111}p{margin-bottom:6px}pre{margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0,0,0,0.08);color:#333;padding:11px;overflow:auto;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}pre span{color:#999}pre .error{color:#f00}h2{margin:0 0 12px 0}h3{margin:0 0 6px 0;color:#333;font-size:18px;line-height:24px}ul{margin:0 0 18px 0;padding:0 0 0 18px}fieldset{border:1px solid #b2b2b2;margin-bottom:18px;padding:17px}.pass{margin-top:18px;padding:2px 20px 2px 40px;color:#006600;background:#E2F9E3;border:1px solid #8DD38D;border-radius:4px}.fail{margin-top:18px;padding:2px 20px 2px 40px;color:#C80700;background:#FFE9E9;border:1px solid #C80700;border-radius:4px}
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIj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29saWQgIzhERDM4RDtcblx0Ym9yZGVyLXJhZGl1czo0cHg7XG59XG5cbi5mYWlsIHtcblx0bWFyZ2luLXRvcDoxOHB4OyBwYWRkaW5nOjJweCAyMHB4IDJweCA0MHB4OyBjb2xvcjojQzgwNzAwOyBiYWNrZ3JvdW5kOiNGRkU5RTk7XG5cdGJvcmRlcjoxcHggc29saWQgI0M4MDcwMDsgYm9yZGVyLXJhZGl1czo0cHg7XG59XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= */
body{background:#eee!important;margin:0;overflow-x:hidden;padding:0;font-family:Helvetica,Arial,sans-serif}.info{padding:18px;background-color:#003050;position:relative;line-height:24px;background-image:-webkit-gradient(linear,left top,left bottom,from(#002137),color-stop(10%,#003050),color-stop(90%,#003050),color-stop(90%,#002137));background-image:-webkit-linear-gradient(#002137,#003050 10%,#003050 90%,#002137);background-image:linear-gradient(#002137,#003050 10%,#003050 90%,#002137);z-index:9999}.info,.info h1{margin:0 0 6px;color:#fff}.info h1{padding:0 32px 0 0;font-size:24px;text-shadow:0 1px #002137;line-height:30px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmdJREFUeNpiYCASxJ17p8BAAmAh0sD5QAyiFYk1mJGAoQFQQwWgQoKLjIQ+kG0w0EABqIEByOKLjYWZ/////48Yg5lwuPI+uqF/f/88TqyhKGEMdWU/ECegK/r358/Va8tnx5AceVBD9wOxAbqCX18+zbm+am7HpaktD9AcEQCNUBDYAAz7CxhhDFTYAKTqkSX+//37+N3tq4Xboh33ALmfYcEAVJsA9ZkAmhtABifCLIAZ/B5Z4Z9vX1ddXjK15srMzkdAA38iudQB6jNcAJRiFEEpBxbGAsiRtNxWLh3I/ITkSpC3QUGRTyBoYfGUiJFBmJiY/wIN/IAl2S1AdgAoQr88fdjHysMjwyks3ohkBCioEsFBEXv2zUdGRiY+JEmQIQ+hLoQZdgBo2BMmFpaYnx/e9a1yVu0AhT0QM0cefjSPhYs7DEm/IAs0TFewcvOmodmKnuSevLp0uouVi3sDMEJ3AX31GZ60uLjV0DLSJ7DB9/dsalHxDrcGukYbV+B9enJ/xu5Un2tA5i1YhCKVIwbIqQkUN+Ccd7Ip7+nlRZP9QakB3UCQwrc3LoVsDrY4BdTwF8nQAiB1HogdkNX//v5tOUpZwQgMZCDFZ906S51fQVUGmjk+7Un3vwRKRkgGYi1HYMkUmKJSQMGEUQgBLWBGyur/gIp+I6VjA2g6Rs8cDNAIbYalKIzkBvIuKDnjCGqMHAdKdi8vnCgE+uwESoQykAYc0MuRlfaKVdCg+o232MRT6AugRyjQ0BKgga/RDSUJgCI39vTrRxGHHszWzahQBfLZGagFgIaJAzE/NAXhBQABBgBJL0aZBy/F5wAAAABJRU5ErkJggg==) no-repeat right 3px}.info h3{color:#7da4be;font-size:16px;line-height:18px;font-weight:400}.info p{margin:0;font-size:14px;color:#fff}.info a{color:#fff;font-weight:700;text-decoration:none}.info a:active,.info a:hover{color:#fff;text-decoration:underline}.header{margin:0;border-bottom:6px solid #ccdef3;height:23px;background-color:#666673;padding:4px 0 2px 6px}.build,.options,.trace{padding:6px 12px;background:#eee!important;position:relative;z-index:9999}.build li,.options li,.trace li{font-size:14px;margin:6px 0}a{color:#666}a:hover{color:#222}a:active{color:#111}p{margin-bottom:6px}pre{margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0,0,0,.08);color:#333;padding:11px;overflow:auto;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}pre span{color:#999}pre .error{color:red}h2{margin:0 0 12px}h3{margin:0 0 6px;color:#333;font-size:18px;line-height:24px}ul{margin:0 0 18px;padding:0 0 0 18px}fieldset{border:1px solid #b2b2b2;margin-bottom:18px;padding:17px}.pass{color:#060;background:#e2f9e3;border:1px solid #8dd38d;border-radius:4px}.fail,.pass{margin-top:18px;padding:2px 20px 2px 40px}.fail{color:#c80700;background:#ffe9e9;border:1px solid #c80700;border-radius:4px}

View File

@ -1,5 +1,7 @@
import $ from 'jQuery';
require('../styles/legacy/ConfirmedPasswordField.scss');
$(document).on('click', '.confirmedpassword .showOnClick a', function () {
var $container = $('.showOnClickContainer', $(this).parent());

View File

@ -1,5 +1,8 @@
import $ from 'jQuery';
// entwine also required, but can't be included more than once without error
require('../../../thirdparty/jquery-ui/jquery-ui.js');
$.fn.extend({
ssDatepicker: function(opts) {
return $(this).each(function() {

View File

@ -1,6 +1,11 @@
import $ from 'jQuery';
import i18n from 'i18n';
require('../../../thirdparty/jquery-ui/jquery-ui.js');
require('../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
require('../styles/legacy/GridField.scss');
$.entwine('ss', function($) {
$('.grid-field').entwine({
/**

View File

@ -1,5 +1,7 @@
import $ from 'jQuery';
require('../styles/legacy/CheckboxSetField.scss');
$.entwine('ss', function($){
/**
* Automatically check and disable all checkboxes if ADMIN permissions are selected.

View File

@ -1,5 +1,8 @@
import $ from 'jQuery';
require('../styles/legacy/SelectionGroup.scss');
$(document).ready(function() {
// Support both bootstrap / legacy selectors
$('ul.SelectionGroup input.selector, ul.selection-group input.selector')

View File

@ -1,5 +1,11 @@
import $ from 'jQuery';
require('../../../thirdparty/jquery-ui/jquery-ui.js');
require('../../../thirdparty/jquery-cookie/jquery.cookie.js');
require('../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
require('../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
$.entwine('ss', function($){
/**
* Lightweight wrapper around jQuery UI tabs for generic tab set-up

View File

@ -1,5 +1,10 @@
import $ from 'jQuery';
// entwine also required, but can't be included more than once without error
require('../../../thirdparty/jquery-ui/jquery-ui.js');
require('../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
$.entwine('ss', function($){
$('.ss-toggle').entwine({
onadd: function() {

View File

@ -1,6 +1,12 @@
import $ from 'jQuery';
import i18n from 'i18n';
require('../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
require('../../../thirdparty/jstree/jquery.jstree.js');
require('../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
require('../styles/legacy/TreeDropdownField.scss');
$.entwine('ss', function($){
/**
* On resize of any close the open treedropdownfields

View File

@ -1,6 +1,21 @@
import $ from 'jQuery';
import i18n from 'i18n';
// entwine also required, but can't be included more than once without error
require('../../../thirdparty/jquery-ui/jquery-ui.js');
require('../../../admin/client/src/legacy/ssui.core.js');
window.tmpl = require('../../../thirdparty/javascript-templates/tmpl.js');
require('../../../thirdparty/javascript-loadimage/load-image.js');
require('../../../thirdparty/jquery-fileupload/jquery.iframe-transport.js');
require('../../../thirdparty/jquery-fileupload/cors/jquery.xdr-transport.js');
require('../../../thirdparty/jquery-fileupload/jquery.fileupload.js');
require('../../../thirdparty/jquery-fileupload/jquery.fileupload-ui.js');
require('./UploadField_uploadtemplate.js');
require('./UploadField_downloadtemplate.js');
require('../styles/legacy/UploadField.scss');
$.widget('blueimpUIX.fileupload', $.blueimpUI.fileupload, {
_initTemplates: function() {
this.options.templateContainer = document.createElement(

View File

@ -1,4 +1,4 @@
window.tmpl.cache['ss-uploadfield-downloadtemplate'] = tmpl(
tmpl.cache['ss-uploadfield-downloadtemplate'] = tmpl(
'{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}' +
'<li class="ss-uploadfield-item template-download{% if (file.error) { %} ui-state-error{% } %}" data-fileid="{%=file.id%}">' +
'{% if (file.thumbnail_url) { %}' +

View File

@ -1,4 +1,4 @@
window.tmpl.cache['ss-uploadfield-uploadtemplate'] = tmpl(
window.tmpl.cache['ss-uploadfield-uploadtemplate'] = window.tmpl(
'{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}' +
'<li class="ss-uploadfield-item template-upload{% if (file.error) { %} ui-state-error{% } %}">' +
'<div class="ss-uploadfield-item-preview preview"><span></span></div>' +

View File

@ -89,7 +89,7 @@ body.cms.ss-uploadfield-edit-iframe {
}
> fieldset {
@extend .clearfix;
@include clearfix;
}
&::after {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

View File

@ -35,13 +35,14 @@ If you have the `cms` module installed, there's additional files in `cms/client
All build commands are run through `npm`. You can check the module's
`package.json` for available commands.
Under the hood, files are built through [Gulp](http://gulpjs.com/)
and associated tooling.
Under the hood, files are built through [Webpack](https://webpack.github.io/).
You'll need to run at least the `build` and `css` commands.
Check our [build tooling](/contributing/build_tooling) docs for more details.
```
(cd framework && npm run build --development)
(cd framework && npm run build && npm run css)
```
Please make sure you build all files before submitting a pull request!
## Coding Conventions
@ -52,7 +53,7 @@ coding conventions.
## Sprites
We use sprites to handle various icons and images throughout the CMS. These are automatically generated
by running `npm run sprites` and can be found at `/admin/client/src/sprites/dist`. To add new
by running `npm run build` and can be found at `/admin/client/src/sprites/dist`. To add new
images to the sprites, simply add the image to the folder matching the image's size in
`/admin/client/sprites` then run `npm run sprites` to generate the sprite containing your image.
Along with the new sprite containing your image, there will also be a new variable in

View File

@ -206,32 +206,6 @@ how-to.
## ReactJS in SilverStripe
### Requiring React
If you want to use React in a module, you can do so with browserify by simply setting it as external during your build chain. For example, with gulp it would look something like this:
```javascript
gulp.task('build', function () {
browserify({
// Browserify options...
})
.external('react')
.external('silverstripe-component')
.external('react-dom')
.external('react-addons-test-utils')
.external('react-redux')
.external('redux')
.external('redux-thunk')
.pipe(gulp.dest('path/to/dist'));
})
```
Then you can require React in the normal way.
```javascript
import React from 'react';
```
### SilverStripeComponent
The base class for SilverStripe React components. If you're building React components for the CMS, this is the class you want to extend. `SilverStripeComponent` extends `React.Component` and adds some handy CMS specific behaviour.

View File

@ -114,7 +114,8 @@ All static files (images, javascript, stylesheets, fonts) used for the CMS and f
in `framework` and `cms` have moved locations. These assets are now placed in a `client/` subfolder,
to account for a structural change where both javascript and styles are co-located in component-specific folders.
This will affect you if you have used `Requirements::block()` on files in the `framework/` or `cms/` folder.
Care should also be taken when referencing images in these folders from your own stylesheets.
Care should also be taken when referencing images in these folders from your own stylesheets (`url()`),
or via SilverStripe templates (`<img>` tags).
`Requirements` now throws an exception then a file is not found, rather than
failing silently, so check your `Requirements` are pointing to files that exist.
@ -138,8 +139,8 @@ admin/font/ => admin/client/dist/font/
```
If you're not doing this already, we suggest looking into a JavaScript bundler
like [Browserify](http://browserify.org/), to combine JavaScript files. SilverStripe
core is moving away from `Requirements::combine_files` in favour of Browserify as of
like [Webpack](http://webpack.github.io/), to combine JavaScript files. SilverStripe
core is moving away from `Requirements::combine_files` in favour of Webpack as of
4.0 and `Requirements::combine_files` is being considered for deprecation in future
versions.

View File

@ -1,4 +1,4 @@
## Client-side build tooling
# Client-side build tooling
Core JavaScript, CSS, and thirdparty dependencies are managed with the build tooling
described below.
@ -6,60 +6,94 @@ described below.
Note this only applies to core SilverStripe dependencies, you're free to manage
dependencies in your project codebase however you like.
### Node.js
## Installation
The [Node.js](https://nodejs.org) JavaScript runtime is the foundation of our client-side
The [NodeJS](https://nodejs.org) JavaScript runtime is the foundation of our client-side
build tool chain. If you want to do things like upgrade dependencies, make changes to core
JavaScript or SCSS files, you'll need Node installed on your dev environment. Our build
tooling supports the v4.2.x (LTS) version of Node.
You'll likely want to manage multiple versions of Node, we suggest using
[Node Version Manager](https://github.com/creationix/nvm).
tooling supports the v4.x (LTS) version of NodeJS.
If you already have a newer version of Node.js installed, check out the
[Node Version Manager](https://github.com/creationix/nvm) to run multiple versions
in your environment.
Since we're compiling SVG icons, you'll also need to compile native Node addons,
which requires `gcc` or a similar compiler - see [node-gyp](https://github.com/nodejs/node-gyp#installation)
for instructions on how to get a compiler running on your platform.
### npm
[npm](https://www.npmjs.com/) is the package manager we use for JavaScript dependencies.
It comes bundled with Node.js so should already have it installed if you have Node.
It comes bundled with NodeJS so should already have it installed if you have Node.
The configuration for an npm package goes in `package.json`.
The configuration for an npm package goes in `package.json`. You'll see one in the root
directory of `framework`. As well as being used for defining dependencies and basic package
information, the `package.json` file has some other handy features.
Once you've installed Node.js, run the following command in each core module folder:
#### npm scripts
```
npm install
```
The `script` property of a `package.json` file can be used to define command line scripts.
## The Basics: ES6, Webpack and Babel
[ECMAScript 6](https://github.com/lukehoban/es6features](https://github.com/lukehoban/es6features) (ES6)
is the newest version of the ECMAScript standard. It has some great new
features, but the browser support is still patchy, so we use Babel to transform ES6 source
files back to ES5 files for distribution.
[Webpack](https://webpack.github.io) contains the build tooling to
"transpile" various syntax patterns (ES6, SCSS) into a format the browser can understand,
and resolve ES6's `import` ([details](https://github.com/lukehoban/es6features#modules)).
Webpack provides the entry point to our build tooling through a `webpack.config.js`
file in the root folder of each core module.
[Babel](https://babeljs.io/) is a JavaScript compiler. It takes JavaScript files as input,
performs some transformations, and outputs other JavaScript files. In SilverStripe we use
Babel to transform our JavaScript in two ways.
## Build Commands
The `script` property of a `package.json` file can be used to define command line
[scripts](https://docs.npmjs.com/misc/scripts](https://docs.npmjs.com/misc/scripts).
A nice thing about running commands from an npm script is binaries located in
`node_modules/.bin/` are temporally added to your `$PATH`. This means we can use dependencies
defined in `package.json` for things like compiling JavaScript and SCSS, and not require
developers to install these tools globally. This means builds are much more consistent
across development environments.
For more info on npm scripts see
[https://docs.npmjs.com/misc/scripts](https://docs.npmjs.com/misc/scripts)
To run an npm script, open up your terminal, change to the directory where `package.json`
is located, and run `$ npm run <SCRIPT_NAME>`. Where `<SCRIPT_NAME>` is the name of the
script you wish to run.
Here are the scripts which are available in `framework`
Note you'll need to run an `npm install` to download the dependencies required by these scripts.
##### build
### build
```
$ npm run build
```
Runs a Gulp task which builds the core JavaScript files. You will need to run this script
whenever you make changes to a JavaScript file.
Runs [Webpack](https://webpack.github.io/) to builds the core JavaScript files.
You will need to run this script whenever you make changes to a JavaScript file.
Run this script with the `--development` flag to watch for changes in JavaScript files
and automatically trigger a rebuild.
Run this script with `-- --watch` to automatically rebuild on file changes.
The first `--` separator is required to separate arguments from NPM's own ones.
##### lint
```
$ npm run build -- --watch
```
### css
```
$ npm run css
```
Compiles all of the `.scss` files into minified `.css` files.
Run this script with `-- --watch` to automatically rebuild on file changes.
The first `--` separator is required to separate arguments from NPM's own ones.
```
$ npm run css -- --watch
```
### lint
```
$ npm run lint
@ -67,7 +101,7 @@ $ npm run lint
Run `eslint` over JavaScript files reports errors.
##### test
### test
```
$ npm run test
@ -75,7 +109,7 @@ $ npm run test
Runs the JavaScript unit tests.
##### coverage
### coverage
```
$ npm run coverage
@ -84,43 +118,7 @@ $ npm run coverage
Generates a coverage report for the JavaScript unit tests. The report is generated
in the `coverage` directory.
##### css
```
$ npm run css
```
Compile all of the .scss files into minified .css files. Run with the `--development` flag to
compile non-minified CSS and watch for every time a .scss file is changed.
##### sprites
```
$ npm run sprites
```
Generates sprites from the individual image files in `admin/images/sprites/src`.
##### thirdparty
```
$ npm run thirdparty
```
Copies legacy JavaScript dependencies from `node_modules` into the `thirdparty` directory.
This is only required legacy dependencies which are not written as CommonJS or ES6 modules.
All other modules will be included automatically with the `build` script.
##### sanity
```
$ npm run sanity
```
Makes sure files in `thirdparty` match files copied from `node_modules`. You should never commit
custom changes to a library file. This script will catch them if you do :smile:
##### lock
### lock
```
$ npm run lock
@ -132,126 +130,43 @@ or when updating packages. Commit the resulting `npm-shrinkwrap.json`. This uses
[npm-shrinkwrap](https://github.com/uber/npm-shrinkwrap) library
since the built-in `npm shrinkwrap` (without a dash) has proven unreliable.
### Gulp
## Requiring SilverStripe ES6 Modules in your own CMS customisation
[Gulp](http://gulpjs.com/) is the build system which gets invoked by most npm scripts
in SilverStripe. The `gulpfile.js` script is where Gulp tasks are defined.
SilverStripe creates bundles which contain many dependencies you might also
want to use in your own CMS customisation (e.g. `react`).
You might also need some of SilverStripe's own ES6 modules (e.g. `components/FormBuilder`).
Here are the Gulp tasks which are defined in `gulpfile.js`
To avoid double including these in your own generated bundles,
we have exposed many libraries as [Webpack externals](https://webpack.github.io/docs/library-and-externals.html).
This helps to keep the file size of your own bundle small, and avoids
execution issues with multiple versions of the same library.
#### build
In order to find out which libraries are exposed, check
the `framework/admin/client/src/bundles/` files for `require('expose?...')` statements.
This is where JavaScript files are compiled and bundled. There are two parts to this which
are important to understand when working core JavaScript files.
A shortened `webpack.config.js` in your own module could look as follows:
##### Babel
[Babel](https://babeljs.io/) is a JavaScript compiler. It takes JavaScript files as input,
performs some transformations, and outputs other JavaScript files. In SilverStripe we use
Babel to transform our JavaScript in two ways.
###### Transforming ES6
ECMAScript 6 (ES6) is the newest version of the ECMAScript standard. It has some great new
features, but the browser support is still patchy, so we use Babel to transform ES6 source
files back to ES5 files for distribution.
To see some of the new features check out
[https://github.com/lukehoban/es6features](https://github.com/lukehoban/es6features)
###### Transforming to UMD
[Universal Module Definition](https://github.com/umdjs/umd) (UMD) is a pattern for writing
JavaScript modules. The advantage of UMD is modules can be 'required' by module loaders
(AMD and ES6 / CommonJS) and can also be loaded via `<script>` tags. Here's a simple example.
```js
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jQuery'], factory);
} else if (typeof exports === 'object') {
// CommonJS
module.exports = factory(require('jQuery'));
} else {
// Default browser with no bundling (global is window)
global.MyModule = factory(global.jQuery);
}
}(this, function (jQuery) {
// Module code here
}));
```
module.exports = {
entry: {
'bundle': `mymodule/client/src/js/bundle.js`,
},
output: {
path: './client/dist',
filename: 'js/[name].js',
},
externals: {
'components/FormBuilder/FormBuilder': 'FormBuilder',
jQuery: 'jQuery',
react: 'react',
}
};
```
The UMD wrapper is generated by Babel so you'll never have to write it manually,
it's handled for you by the build task.
Now you can use the following statements in your ES6 code without double includes:
##### Browserify
One of the great new features in ES6 is
[support for native modules](https://github.com/lukehoban/es6features#modules).
In order to support modules, SilverStripe uses
[Browserify](https://github.com/substack/node-browserify) to bundle modules for distribution.
Browserify takes an entry file, creates an abstract syntax tree (AST) by recursively
looking up all the `require` statements it finds, and outputs a bundled JavaScript file which
can be executed in a browser.
In addition to being a concatenated JavaScript file, Browserify bundles contain a lightweight
`require()` implementation, and an API wrapper which allows modules to require each other at
runtime. In most cases modules will bundled together in one JavaScript file, but it's also
possible to require modules bundled in another file, these are called external dependencies.
In this example the `BetterField` module requires `jQuery` from another bundle.
__gulpfile.js__
```js
gulp.task('bundle-a', function () {
return browserify()
.transform(babelify.configure({
presets: ['es2015'] // Transform ES6 to ES5.
}))
.require('jQuery', { expose: 'jQuery' }) // Make jQuery available to other bundles at runtime.
.bundle()
.pipe(source('bundle-a.js'))
.pipe(gulp.dest('./dist'));
});
```
This generates a bundle `bundle-a.js` which includes jQuery and exposed it to other bundles.
__better-field.js__
```js
import $ from 'jQuery';
$('.better-field').fadeIn();
import react from 'react';
import jQuery from 'jQuery';
import FormBuilder from 'components/FormBuilder/FormBuilder';
```
__gulpfile.js__
```js
...
gulp.task('bundle-better-field', function () {
return browserify('./src/better-field.js')
.transform(babelify.configure({
presets: ['es2015'] // Transform ES6 to ES5.
}))
.external('jQuery') // Get jQuery from another bundle at runtime.
.bundle()
.pipe(source('bundle-b.js'))
.pipe(gulp.dest('./dist'));
});
```
When Browserify bundles `./src/better-field.js` (the entry file) it will ignore all
require statements that refer to `jQuery` and assume `jQuery` will be available via another
bundle at runtime.
The advantage of using externals is a reduced file size. The browser only needs to download
`jQuery` once (inside `bundle-a.js`) rather than it being included in multiple bundles.
Core dependencies are bundled and exposed in the `bundle-lib.js` file. Most of the libraries
a CMS developer requires are available a externals in that bundle.

View File

@ -1,553 +0,0 @@
const packageJson = require('./package.json');
const autoprefixer = require('autoprefixer');
const babelify = require('babelify'); // eslint-disable-line no-unused-vars
const browserify = require('browserify');
const eventStream = require('event-stream');
const glob = require('glob');
const gulp = require('gulp');
const coffee = require('gulp-coffee');
const concat = require('gulp-concat');
const merge = require('merge-stream');
const order = require('gulp-order');
const babel = require('gulp-babel');
const diff = require('gulp-diff');
const gulpif = require('gulp-if');
const notify = require('gulp-notify');
const postcss = require('gulp-postcss');
const sass = require('gulp-sass');
const sourcemaps = require('gulp-sourcemaps');
const uglify = require('gulp-uglify');
const gulpUtil = require('gulp-util');
const path = require('path');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const semver = require('semver');
const sprity = require('sprity');
const watchify = require('watchify');
const flatten = require('gulp-flatten');
const isDev = typeof process.env.npm_config_development !== 'undefined';
process.env.NODE_ENV = isDev ? 'development' : 'production';
const PATHS = {
MODULES: './node_modules',
ADMIN: './admin',
ADMIN_IMAGES: './admin/client/dist/images',
ADMIN_CSS_SRC: './admin/client/src/styles',
ADMIN_CSS_DIST: './admin/client/dist/styles',
ADMIN_THIRDPARTY: './admin/thirdparty',
ADMIN_JS_SRC: './admin/client/src',
ADMIN_JS_DIST: './admin/client/dist/js',
ADMIN_SPRITES_SRC: './admin/client/src/sprites',
ADMIN_SPRITES_DIST: './admin/client/dist/images/sprites',
FRAMEWORK: '.',
FRAMEWORK_CSS_SRC: './client/src/styles',
FRAMEWORK_CSS_DIST: './client/dist/styles',
FRAMEWORK_THIRDPARTY: './thirdparty',
INSTALL_CSS_SRC: './dev/install/client/src/styles',
INSTALL_CSS_DIST: './dev/install/client/dist/styles',
FRAMEWORK_JS_SRC: './client/src',
FRAMEWORK_JS_DIST: './client/dist/js',
};
// Map of *.scss locations to their compile target folders
const scssFolders = {
[PATHS.FRAMEWORK_CSS_SRC]: PATHS.FRAMEWORK_CSS_DIST,
[PATHS.ADMIN_CSS_SRC]: PATHS.ADMIN_CSS_DIST,
[PATHS.INSTALL_CSS_SRC]: PATHS.INSTALL_CSS_DIST,
};
const browserifyOptions = {
debug: true,
paths: [PATHS.ADMIN_JS_SRC, PATHS.FRAMEWORK_JS_SRC],
};
const babelifyOptions = {
presets: ['es2015', 'es2015-ie', 'react'],
plugins: ['transform-object-assign', 'transform-object-rest-spread'],
ignore: /(node_modules|thirdparty)/,
comments: false,
};
const uglifyOptions = {
mangle: false,
};
// Used for autoprefixing css properties (same as Bootstrap Aplha.2 defaults)
const supportedBrowsers = [
'Chrome >= 35',
'Firefox >= 31',
'Edge >= 12',
'Explorer >= 9',
'iOS >= 8',
'Safari >= 8',
'Android 2.3',
'Android >= 4',
'Opera >= 12',
];
const blueimpFileUploadConfig = {
src: `${PATHS.MODULES}/blueimp-file-upload`,
dest: `${PATHS.FRAMEWORK_THIRDPARTY}/jquery-fileupload`,
files: [
'/cors/jquery.postmessage-transport.js',
'/cors/jquery.xdr-transport.js',
'/jquery.fileupload-ui.js',
'/jquery.fileupload.js',
'/jquery.iframe-transport.js',
],
};
const blueimpLoadImageConfig = {
src: `${PATHS.MODULES}/blueimp-load-image`,
dest: `${PATHS.FRAMEWORK_THIRDPARTY}/javascript-loadimage`,
files: ['/load-image.js'],
};
const blueimpTmplConfig = {
src: `${PATHS.MODULES}/blueimp-tmpl`,
dest: `${PATHS.FRAMEWORK_THIRDPARTY}/javascript-templates`,
files: ['/tmpl.js'],
};
const jquerySizesConfig = {
src: `${PATHS.MODULES}/jquery-sizes`,
dest: `${PATHS.ADMIN_THIRDPARTY}/jsizes`,
files: ['/lib/jquery.sizes.js'],
};
const tinymceConfig = {
src: `${PATHS.MODULES}/tinymce`,
dest: `${PATHS.FRAMEWORK_THIRDPARTY}/tinymce`,
files: [
'/tinymce.min.js', // Exclude unminified file to keep repository size down
'/jquery.tinymce.min.js',
'/themes/**',
'/skins/**',
'/plugins/**',
],
};
/**
* Copies files from a source directory to a destination directory.
*
* @param object libConfig
* @param string libConfig.src - The source directory
* @param string libConfig.dest - The destination directory
* @param array libConfig.files - The list of files to copy from the source to
* the destination directory
*/
function copyFiles(libConfig) {
libConfig.files.forEach((file) => {
const dir = path.parse(file).dir;
gulp.src(libConfig.src + file)
.pipe(gulp.dest(libConfig.dest + dir));
});
}
/**
* Diffs files in a source directory against a destination directory.
*
* @param object libConfig
* @param string libConfig.src - The source directory
* @param string libConfig.dest - The destination directory
* @param array libConfig.files - The list of files to copy from the source
* to the destination directory
*/
function diffFiles(libConfig) {
libConfig.files.forEach((file) => {
const dir = path.parse(file).dir;
gulp.src(libConfig.src + file)
.pipe(diff(libConfig.dest + dir))
.pipe(diff.reporter({ fail: true, quiet: true }))
.on('error', () => {
console.error(new Error( // eslint-disable-line
`Sanity check failed. ${libConfig.dest}${file} has been modified.`
));
process.exit(1);
});
});
}
/**
* Transforms the passed JavaScript files to UMD modules.
*
* @param array files - The files to transform.
* @param string dest - The output directory.
* @return object
*/
function transformToUmd(files, dest) {
return eventStream.merge(files.map((file) => { // eslint-disable-line
return gulp.src(file)
.pipe(babel({
presets: ['es2015'],
moduleId: `ss.${path.parse(file).name}`,
plugins: ['transform-es2015-modules-umd'],
comments: false,
}))
.on('error', notify.onError({
message: 'Error: <%= error.message %>',
}))
.pipe(gulp.dest(dest));
}));
}
// Make sure the version of Node being used is valid.
if (!semver.satisfies(process.versions.node, packageJson.engines.node)) {
console.error( // eslint-disable-line
`Invalid Node.js version. You need to be using ${packageJson.engines.node}. ` +
'If you want to manage multiple Node.js versions try https://github.com/creationix/nvm'
);
process.exit(1);
}
if (isDev) {
browserifyOptions.cache = {};
browserifyOptions.packageCache = {};
browserifyOptions.plugin = [watchify];
}
gulp.task('build', ['umd', 'bundle']);
gulp.task('bundle', ['bundle-lib', 'bundle-legacy', 'bundle-framework']);
gulp.task('bundle-lib', function bundleLib() {
const bundleFileName = 'bundle-lib.js';
const es6 = browserify(Object.assign({}, browserifyOptions,
{ entries: `${PATHS.ADMIN_JS_SRC}/bundles/lib.js` }
))
.on('update', bundleLib)
.on('log', (msg) =>
gulpUtil.log('Finished', `bundled ${bundleFileName} ${msg}`)
)
.transform('babelify', babelifyOptions)
.require('deep-freeze-strict',
{ expose: 'deep-freeze-strict' }
)
.require('react',
{ expose: 'react' }
)
.require('tether',
{ expose: 'tether' }
)
.require('react-bootstrap-ss',
{ expose: 'react-bootstrap-ss' }
)
.require('react-addons-css-transition-group',
{ expose: 'react-addons-css-transition-group' }
)
.require('react-addons-test-utils',
{ expose: 'react-addons-test-utils' }
)
.require('react-dom',
{ expose: 'react-dom' }
)
.require('react-redux',
{ expose: 'react-redux' }
)
.require('redux',
{ expose: 'redux' }
)
.require('redux-thunk',
{ expose: 'redux-thunk' }
)
.require('react-router',
{ expose: 'react-router' }
)
.require('react-router-redux',
{ expose: 'react-router-redux' }
)
.require('page.js',
{ expose: 'page.js' }
)
.require(`${PATHS.MODULES}/bootstrap/dist/js/umd/collapse.js`,
{ expose: 'bootstrap-collapse' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/Form/Form`,
{ expose: 'components/Form/Form' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/Form/FormConstants`,
{ expose: 'components/Form/FormConstants' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/FormAction/FormAction`,
{ expose: 'components/FormAction/FormAction' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/FormBuilder/FormBuilder`,
{ expose: 'components/FormBuilder/FormBuilder' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/GridField/GridField`,
{ expose: 'components/GridField/GridField' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/GridField/GridFieldCell`,
{ expose: 'components/GridField/GridFieldCell' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/GridField/GridFieldHeader`,
{ expose: 'components/GridField/GridFieldHeader' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/GridField/GridFieldHeaderCell`,
{ expose: 'components/GridField/GridFieldHeaderCell' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/GridField/GridFieldRow`,
{ expose: 'components/GridField/GridFieldRow' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/GridField/GridFieldTable`,
{ expose: 'components/GridField/GridFieldTable' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/HiddenField/HiddenField`,
{ expose: 'components/HiddenField/HiddenField' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/TextField/TextField`,
{ expose: 'components/TextField/TextField' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/Toolbar/Toolbar`,
{ expose: 'components/Toolbar/Toolbar' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/Breadcrumb/Breadcrumb`,
{ expose: 'components/Breadcrumb/Breadcrumb' }
)
.require(`${PATHS.ADMIN_JS_SRC}/state/breadcrumbs/BreadcrumbsActions`,
{ expose: 'state/breadcrumbs/BreadcrumbsActions' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/PopoverField/PopoverField`,
{ expose: 'components/PopoverField/PopoverField' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/SingleSelectField/SingleSelectField`,
{ expose: 'components/SingleSelectField/SingleSelectField' }
)
.require(`${PATHS.ADMIN_JS_SRC}/components/FormBuilderModal/FormBuilderModal`,
{ expose: 'components/FormBuilderModal/FormBuilderModal' }
)
.require(`${PATHS.FRAMEWORK_JS_SRC}/i18n.js`,
{ expose: 'i18n' }
)
.require(`${PATHS.FRAMEWORK_JS_SRC}/i18nx.js`,
{ expose: 'i18nx' }
)
.require(`${PATHS.ADMIN_JS_SRC}/lib/Config`,
{ expose: 'lib/Config' }
)
.require(`${PATHS.FRAMEWORK_JS_SRC}/jQuery.js`,
{ expose: 'jQuery' }
)
.require(`${PATHS.ADMIN_JS_SRC}/lib/ReducerRegister.js`,
{ expose: 'lib/ReducerRegister' }
)
.require(`${PATHS.ADMIN_JS_SRC}/lib/ReactRouteRegister.js`,
{ expose: 'lib/ReactRouteRegister' }
)
.require(`${PATHS.ADMIN_JS_SRC}/lib/Injector.js`,
{ expose: 'lib/Injector' }
)
.require(`${PATHS.ADMIN_JS_SRC}/lib/Router.js`,
{ expose: 'lib/Router' }
)
.require(`${PATHS.ADMIN_JS_SRC}/lib/SilverStripeComponent`,
{ expose: 'lib/SilverStripeComponent' }
)
.require(`${PATHS.ADMIN_JS_SRC}/lib/Backend`,
{ expose: 'lib/Backend' }
)
.bundle()
.on('error', notify.onError({ message: `${bundleFileName}: <%= error.message %>` }))
.pipe(source(bundleFileName))
.pipe(buffer());
const chosen = gulp.src([
`${PATHS.MODULES}/chosen/coffee/lib/*.coffee`,
`${PATHS.MODULES}/chosen/coffee/chosen.jquery.coffee`,
])
.pipe(concat('chosen.js'))
.pipe(coffee());
return merge(es6, chosen)
.pipe(order([`**/${bundleFileName}`, '**/chosen.js']))
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(concat(bundleFileName, { newLine: '\r\n;\r\n' }))
.pipe(uglify(uglifyOptions))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(PATHS.ADMIN_JS_DIST));
});
gulp.task('bundle-legacy', function bundleLeftAndMain() {
const bundleFileName = 'bundle-legacy.js';
return browserify(Object.assign({}, browserifyOptions,
{ entries: `${PATHS.ADMIN_JS_SRC}/bundles/legacy.js` }
))
.on('update', bundleLeftAndMain)
.on('log', (msg) =>
gulpUtil.log('Finished', `bundled ${bundleFileName} ${msg}`)
)
.transform('babelify', babelifyOptions)
.external('config')
.external('jQuery')
.external('i18n')
.external('i18nx')
.external('lib/Router')
.external('react')
.external('react-dom')
.external('react-bootstrap-ss')
.external('components/FormBuilderModal/FormBuilderModal')
.bundle()
.on('update', bundleLeftAndMain)
.on('error', notify.onError({ message: `${bundleFileName}: <%= error.message %>` }))
.pipe(source(bundleFileName))
.pipe(buffer())
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(uglify(uglifyOptions))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(PATHS.ADMIN_JS_DIST));
});
gulp.task('bundle-framework', function bundleBoot() {
const bundleFileName = 'bundle-framework.js';
return browserify(Object.assign({}, browserifyOptions,
{ entries: `${PATHS.ADMIN_JS_SRC}/boot/index.js` }
))
.on('update', bundleBoot)
.on('log', (msg) => {
gulpUtil.log('Finished', `bundled ${bundleFileName} ${msg}`);
})
.transform('babelify', babelifyOptions)
.external('bootstrap-collapse')
.external('components/Breadcrumb/Breadcrumb')
.external('state/breadcrumbs/BreadcrumbsActions')
.external('components/FormAction/FormAction')
.external('components/FormBuilder/FormBuilder')
.external('components/GridField/GridField')
.external('components/Toolbar/Toolbar')
.external('deep-freeze-strict')
.external('i18n')
.external('i18nx')
.external('jQuery')
.external('lib/Backend')
.external('lib/ReducerRegister')
.external('lib/ReactRouteRegister')
.external('lib/SilverStripeComponent')
.external('page.js')
.external('react-addons-test-utils')
.external('react-dom')
.external('tether')
.external('react-bootstrap-ss')
.external('react-redux')
.external('react-router-redux')
.external('react-router')
.external('react')
.external('redux-thunk')
.external('redux')
.bundle()
.on('update', bundleBoot)
.on('error', notify.onError({ message: `${bundleFileName}: <%= error.message %>` }))
.pipe(source(bundleFileName))
.pipe(buffer())
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(uglify(uglifyOptions))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(PATHS.ADMIN_JS_DIST));
});
gulp.task('sanity', () => {
diffFiles(blueimpFileUploadConfig);
diffFiles(blueimpLoadImageConfig);
diffFiles(blueimpTmplConfig);
diffFiles(jquerySizesConfig);
diffFiles(tinymceConfig);
});
gulp.task('thirdparty', () => {
copyFiles(blueimpFileUploadConfig);
copyFiles(blueimpLoadImageConfig);
copyFiles(blueimpTmplConfig);
copyFiles(jquerySizesConfig);
copyFiles(tinymceConfig);
});
gulp.task('umd', ['umd-admin', 'umd-framework'], () => {
if (isDev) {
gulp.watch(`${PATHS.ADMIN_JS_SRC}/legacy/*.js`, ['umd-admin']);
gulp.watch(`${PATHS.FRAMEWORK_JS_SRC}/**/*.js`, ['umd-framework']);
}
});
gulp.task('umd-admin', () => {
const files = glob.sync(
`${PATHS.ADMIN_JS_SRC}/legacy/*.js`,
{ ignore: `${PATHS.ADMIN_JS_SRC}/LeftAndMain.!(Ping).js` }
);
return transformToUmd(files, PATHS.ADMIN_JS_DIST);
});
gulp.task('umd-framework', () => { // eslint-disable-line
return transformToUmd(glob.sync(
`${PATHS.FRAMEWORK_JS_SRC}/**/*.js`),
PATHS.FRAMEWORK_JS_DIST
);
});
/*
* Takes individual images and compiles them together into sprites
*/
gulp.task('sprites', () => { // eslint-disable-line
return sprity.src({
src: `${PATHS.ADMIN_SPRITES_SRC}/**/*.{png,jpg}`,
cssPath: '../images/sprites',
style: './_sprity.scss',
processor: 'sass',
split: true,
margin: 0,
})
.pipe(
gulpif(
'*.png',
gulp.dest(PATHS.ADMIN_SPRITES_DIST),
gulp.dest(`${PATHS.ADMIN_CSS_SRC}/legacy`)
)
);
});
gulp.task('css', ['compile:css'], () => {
if (isDev) {
Object.keys(scssFolders).forEach((sourceFolder) => {
gulp.watch(`${sourceFolder}/**/*.scss`, ['compile:css']);
});
}
});
/*
* Compiles scss into css
* Watches for changes if --development flag is given
*/
gulp.task('compile:css', () => {
const tasks = Object.keys(scssFolders).map((sourceFolder) => { // eslint-disable-line
const targetFolder = scssFolders[sourceFolder];
return gulp.src(`${sourceFolder}/**/*.scss`)
.pipe(sourcemaps.init())
.pipe(
sass({
outputStyle: 'compressed',
importer: (url, prev, done) => {
if (url.match(/^compass\//)) {
done({ file: 'client/src/styles/_compasscompat.scss' });
} else {
done();
}
},
})
.on('error', notify.onError({
message: 'Error: <%= error.message %>',
}))
)
.pipe(postcss([autoprefixer({ browsers: supportedBrowsers })]))
.pipe(sourcemaps.write())
.pipe(flatten()) // avoid legacy/ paths in CSS output
.pipe(gulp.dest(targetFolder));
});
return tasks;
});

View File

@ -10,15 +10,12 @@
"node": "^4.2.0"
},
"scripts": {
"build": "gulp build",
"css": "gulp css",
"build": "WEBPACK_CHILD=js webpack",
"css": "WEBPACK_CHILD=css webpack",
"lock": "npm-shrinkwrap --dev",
"sanity": "gulp sanity",
"sprites": "gulp sprites",
"test": "NODE_PATH=\"./client/src:./admin/client/src\" jest",
"coverage": "NODE_PATH=\"./client/src:./admin/client/src\" jest --coverage",
"thirdparty": "gulp thirdparty",
"lint": "eslint gulpfile.js & eslint client/src & eslint admin/client/src"
"lint": "eslint client/src & eslint admin/client/src"
},
"repository": {
"type": "git",
@ -39,8 +36,8 @@
"blueimp-file-upload": "^6.0.3",
"blueimp-load-image": "^1.1.3",
"blueimp-tmpl": "^1.0.2",
"bootstrap": "^4.0.0-alpha.2",
"chosen": "github:harvesthq/chosen#v1.5.1",
"bootstrap": "4.0.0-alpha.2",
"chosen-js": "^1.5.1",
"deep-equal": "^1.0.1",
"deep-freeze-strict": "^1.1.1",
"es6-promise": "^3.1.2",
@ -66,48 +63,36 @@
"url": "^0.11.0"
},
"devDependencies": {
"autoprefixer": "^6.3.1",
"autoprefixer": "^6.4.0",
"babel-core": "^6.7.4",
"babel-jest": "^9.0.3",
"babel-loader": "^6.2.5",
"babel-plugin-transform-es2015-modules-umd": "^6.6.5",
"babel-plugin-transform-object-assign": "^6.5.0",
"babel-plugin-transform-object-rest-spread": "^6.8.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-es2015-ie": "^6.6.1",
"babel-preset-react": "^6.5.0",
"babelify": "^7.2.0",
"browserify": "^13.0.0",
"coffee-loader": "^0.7.2",
"css-loader": "^0.23.1",
"eslint": "^2.5.3",
"eslint-config-airbnb": "^6.2.0",
"eslint-plugin-react": "^4.2.3",
"event-stream": "^3.3.2",
"glob": "^6.0.4",
"gulp": "^3.9.0",
"gulp-babel": "^6.1.1",
"gulp-coffee": "^2.3.2",
"gulp-concat": "^2.6.0",
"gulp-debug": "^2.1.2",
"gulp-diff": "^1.0.0",
"gulp-flatten": "^0.2.0",
"gulp-if": "^2.0.0",
"gulp-notify": "^2.2.0",
"gulp-order": "^1.1.1",
"gulp-postcss": "^6.0.1",
"gulp-sass": "^2.1.1",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.1",
"gulp-util": "^3.0.7",
"exports-loader": "^0.6.3",
"expose-loader": "^0.7.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"imports-loader": "^0.6.5",
"jest-cli": "^0.9.2",
"merge-stream": "^1.0.0",
"node-sass": "^3.8.0",
"npm-shrinkwrap": "^5.4.1",
"postcss-loader": "^0.10.1",
"react-addons-test-utils": "^15.3.1",
"redux-logger": "^2.6.1",
"sass-loader": "^4.0.0",
"script-loader": "^0.7.0",
"semver": "^5.1.0",
"sprity": "^1.0.8",
"sprity-sass": "^1.0.4",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"watchify": "^3.7.0"
"sprity-webpack-plugin": "0.0.1",
"webpack": "^1.13.2"
},
"jest": {
"scriptPreprocessor": "<rootDir>/node_modules/babel-jest",

213
webpack.config.js Normal file
View File

@ -0,0 +1,213 @@
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
// const SprityWebpackPlugin = require('sprity-webpack-plugin');
const PATHS = {
MODULES: './node_modules',
ADMIN: './admin',
ADMIN_IMAGES: './admin/client/dist/images',
ADMIN_CSS_SRC: './admin/client/src/styles',
ADMIN_CSS_DIST: './admin/client/dist/styles',
ADMIN_THIRDPARTY: './admin/thirdparty',
ADMIN_JS_SRC: './admin/client/src',
ADMIN_JS_DIST: './admin/client/dist/js',
ADMIN_SPRITES_SRC: './admin/client/src/sprites',
ADMIN_SPRITES_DIST: './admin/client/dist/images/sprites',
FRAMEWORK: '.',
FRAMEWORK_CSS_SRC: './client/src/styles',
FRAMEWORK_CSS_DIST: './client/dist/styles',
FRAMEWORK_THIRDPARTY: './thirdparty',
INSTALL_CSS_SRC: './dev/install/client/src/styles',
INSTALL_CSS_DIST: './dev/install/client/dist/styles',
FRAMEWORK_JS_SRC: './client/src',
FRAMEWORK_JS_DIST: './client/dist/js',
};
// Used for autoprefixing css properties (same as Bootstrap Aplha.2 defaults)
const SUPPORTED_BROWSERS = [
'Chrome >= 35',
'Firefox >= 31',
'Edge >= 12',
'Explorer >= 9',
'iOS >= 8',
'Safari >= 8',
'Android 2.3',
'Android >= 4',
'Opera >= 12',
];
const config = [
{
name: 'js',
entry: {
'bundle-framework': `${PATHS.ADMIN_JS_SRC}/boot/index.js`,
'bundle-legacy': `${PATHS.ADMIN_JS_SRC}/bundles/legacy.js`,
'bundle-lib': `${PATHS.ADMIN_JS_SRC}/bundles/lib.js`,
MemberImportForm: `${PATHS.ADMIN_JS_SRC}/legacy/MemberImportForm.js`,
ModelAdmin: `${PATHS.ADMIN_JS_SRC}/legacy/ModelAdmin.js`,
SecurityAdmin: `${PATHS.ADMIN_JS_SRC}/legacy/SecurityAdmin.js`,
CMSSecurity: `${PATHS.ADMIN_JS_SRC}/legacy/CMSSecurity.js`,
},
resolve: {
modulesDirectories: [PATHS.ADMIN_JS_SRC, PATHS.FRAMEWORK_JS_SRC, PATHS.MODULES],
},
output: {
path: 'admin/client/dist',
filename: 'js/[name].js',
},
// lib.js provies these globals and more. These references allow the framework bundle
// to access them.
externals: {
'bootstrap-collapse': 'BootstrapCollapse',
'components/Breadcrumb/Breadcrumb': 'Breadcrumb',
'state/breadcrumbs/BreadcrumbsActions': 'BreadcrumbsActions',
'components/FormAction/FormAction': 'FormAction',
'components/FormBuilder/FormBuilder': 'FormBuilder',
'components/GridField/GridField': 'GridField',
'components/Toolbar/Toolbar': 'Toolbar',
'deep-freeze-strict': 'DeepFreezeStrict',
i18n: 'i18n',
i18nx: 'i18nx',
jQuery: 'jQuery',
'lib/Backend': 'Backend',
'lib/ReducerRegister': 'ReducerRegister',
'lib/ReactRouteRegister': 'ReactRouteRegister',
'lib/SilverStripeComponent': 'SilverStripeComponent',
'page.js': 'Page',
'react-addons-test-utils': 'ReactAddonsTestUtils',
'react-dom': 'ReactDom',
tether: 'Tether',
'react-bootstrap-ss': 'ReactBootstrap',
'react-redux': 'ReactRedux',
'react-router-redux': 'ReactRouterRedux',
'react-router': 'ReactRouter',
react: 'React',
'redux-thunk': 'ReduxThunk',
redux: 'Redux',
config: 'Config',
'lib/Router': 'Router',
},
devtool: 'source-map',
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|thirdparty)/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react'],
plugins: ['transform-object-assign', 'transform-object-rest-spread'],
comments: false,
},
},
{
test: /\.scss$/,
// We disable url handling because the SCSS files directly reference the
// compiled sprite files
loader: ExtractTextPlugin.extract(
'css?-url&minimize&sourceMap!postcss?sourceMap!sass?sourceMap'
),
// loaders: ['style', 'css?-url&minimize', 'postcss', 'sass'],
},
{
test: /\.css$/,
// We disable url handling because the SCSS files directly reference the
// compiled sprite files
loader: ExtractTextPlugin.extract(
'css?-url&minimize&sourceMap!postcss?sourceMap'
),
// loaders: ['style', 'css?-url&minimize', 'postcss'],
},
{
test: /\.coffee$/,
loader: 'coffee-loader',
},
{
test: '/i18n.js/',
loader: 'script-loader',
},
],
},
postcss: [
autoprefixer({ browsers: SUPPORTED_BROWSERS }),
],
plugins: [
new webpack.ProvidePlugin({
jQuery: 'jQuery',
$: 'jQuery',
}),
/*
new webpack.optimize.UglifyJsPlugin({
compress: {
unused: false,
warnings: false,
},
mangle: false,
}),
*/
new ExtractTextPlugin('styles/bundle.css', { allChunks: true }),
],
},
// Much of the CSS is included in the javascript confiugration (bundle.scss)
// These CSS files have not yet been inlined into the javascript include chain
{
name: 'css',
entry: {
'admin/client/dist/styles/editor':
`${PATHS.ADMIN_CSS_SRC}/editor.scss`,
'client/dist/styles/GridField_print':
`${PATHS.FRAMEWORK_CSS_SRC}/legacy/GridField_print.scss`,
'client/dist/styles/debug':
`${PATHS.FRAMEWORK_CSS_SRC}/legacy/debug.scss`,
'client/dist/styles/AssetUploadField':
`${PATHS.FRAMEWORK_CSS_SRC}/legacy/AssetUploadField.scss`,
'client/dist/styles/UploadField':
`${PATHS.FRAMEWORK_CSS_SRC}/legacy/UploadField.scss`,
[`${PATHS.INSTALL_CSS_DIST}/install`]:
`${PATHS.INSTALL_CSS_SRC}/install.scss`,
},
output: {
path: './',
filename: '[name].css',
},
module: {
loaders: [
{
test: /\.scss$/,
// We disable url handling because the SCSS files directly reference the
// compiled sprite files
loader: ExtractTextPlugin.extract([
'css-loader?-url&minimize',
'postcss-loader',
'sass-loader',
]),
},
],
},
postcss: [
autoprefixer({ browsers: SUPPORTED_BROWSERS }),
],
plugins: [
new ExtractTextPlugin('[name].css', {allChunks: true}),
// new SprityWebpackPlugin({
// src: `${PATHS.ADMIN_SPRITES_SRC}/**/*.{png,jpg}`,
// out: PATHS.ADMIN_SPRITES_DIST,
// cssPath: '../images/sprites',
// style: './_sprity.scss',
// processor: 'sass',
// split: true,
// margin: 0,
// }),
],
},
];
// Use WEBPACK_CHILD=js or WEBPACK_CHILD=css env var to run a single config
if (process.env.WEBPACK_CHILD) {
module.exports = config.filter((entry) => entry.name === process.env.WEBPACK_CHILD)[0];
} else {
module.exports = config;
}