diff --git a/admin/code/CMSBatchActionHandler.php b/admin/code/CMSBatchActionHandler.php index f45533ba9..4bc6c4f3b 100644 --- a/admin/code/CMSBatchActionHandler.php +++ b/admin/code/CMSBatchActionHandler.php @@ -81,7 +81,7 @@ class CMSBatchActionHandler extends RequestHandler { $actionHandler = new $actionClass(); // Sanitise ID list and query the database for apges - $ids = split(' *, *', trim($request->requestVar('csvIDs'))); + $ids = preg_split('/ *, */', trim($request->requestVar('csvIDs'))); foreach($ids as $k => $v) if(!is_numeric($v)) unset($ids[$k]); if($ids) { @@ -135,7 +135,7 @@ class CMSBatchActionHandler extends RequestHandler { $actionHandler = new $actionClass['class'](); // Sanitise ID list and query the database for apges - $ids = split(' *, *', trim($request->requestVar('csvIDs'))); + $ids = preg_split('/ *, */', trim($request->requestVar('csvIDs'))); foreach($ids as $k => $id) $ids[$k] = (int)$id; $ids = array_filter($ids); @@ -157,7 +157,7 @@ class CMSBatchActionHandler extends RequestHandler { $actionHandler = new $actionClass(); // Sanitise ID list and query the database for apges - $ids = split(' *, *', trim($request->requestVar('csvIDs'))); + $ids = preg_split('/ *, */', trim($request->requestVar('csvIDs'))); foreach($ids as $k => $id) $ids[$k] = (int)$id; $ids = array_filter($ids); @@ -211,4 +211,4 @@ class CMSBatchActionHandler extends RequestHandler { return $actions; } -} \ No newline at end of file +} diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 97c471a46..df88b41a3 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -250,7 +250,7 @@ class LeftAndMain extends Controller implements PermissionProvider { SAPPHIRE_ADMIN_DIR . '/thirdparty/jlayout/lib/jquery.jlayout.js', SAPPHIRE_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.js', SAPPHIRE_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.adapter.jquery.js', - // SAPPHIRE_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.html4.js', + SAPPHIRE_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.html4.js', THIRDPARTY_DIR . '/jstree/jquery.jstree.js', SAPPHIRE_ADMIN_DIR . '/thirdparty/chosen/chosen/chosen.jquery.js', SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-hoverIntent/jquery.hoverIntent.js', @@ -322,7 +322,7 @@ class LeftAndMain extends Controller implements PermissionProvider { SSViewer::set_theme(null); } - function handleRequest($request, DataModel $model) { + function handleRequest(SS_HTTPRequest $request, DataModel $model = null) { $title = $this->Title(); $response = parent::handleRequest($request, $model); diff --git a/admin/code/ModelAdmin.php b/admin/code/ModelAdmin.php index 1c5a1834c..131f4e192 100644 --- a/admin/code/ModelAdmin.php +++ b/admin/code/ModelAdmin.php @@ -113,7 +113,7 @@ abstract class ModelAdmin extends LeftAndMain { Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/ModelAdmin.js'); } - function getEditForm($id = null) { + function getEditForm($id = null, $fields = null) { $list = $this->getList(); $exportButton = new GridFieldExportButton(); $exportButton->setExportColumns($this->getExportFields()); diff --git a/admin/css/ie7.css b/admin/css/ie7.css index aaf3eef74..555b52021 100644 --- a/admin/css/ie7.css +++ b/admin/css/ie7.css @@ -20,6 +20,7 @@ html { overflow: hidden; } .jstree li a .ui-icon { text-indent: 0px !important; } +.cms table.ss-gridfield-table tbody td { width: auto; } .cms table.ss-gridfield-table tr th.extra span input { height: 23px; } .ss-gridfield-button-filter.ss-ui-button { margin: -1px -5px; background: #e6e6e6 url(../images/filter-icons.png) no-repeat -40px 6px; filter: none; } diff --git a/admin/css/screen.css b/admin/css/screen.css index 4a8c71756..613a35646 100644 --- a/admin/css/screen.css +++ b/admin/css/screen.css @@ -35,7 +35,7 @@ If more variables exist in the future, consider creating a variables file.*/ /** ---------------------------------------------------- Double tone borders http://daverupert.com/2011/06/two-tone-borders-with-css3/ ----------------------------------------------------- */ /** ----------------------------- Sprite images ----------------------------- */ /** Helper SCSS file for generating sprites for the interface. */ -.btn-icon-sprite, .ui-state-default .btn-icon-accept, .ui-state-default .btn-icon-accept_disabled, .ui-state-default .btn-icon-add, .ui-state-default .btn-icon-add_disabled, .ui-state-default .btn-icon-addpage, .ui-state-default .btn-icon-addpage_disabled, .ui-state-default .btn-icon-arrow-circle-135-left, .ui-state-default .btn-icon-back, .ui-state-default .btn-icon-back_disabled, .ui-state-default .btn-icon-chain--arrow, .ui-state-default .btn-icon-chain--exclamation, .ui-state-default .btn-icon-chain--minus, .ui-state-default .btn-icon-chain--pencil, .ui-state-default .btn-icon-chain--plus, .ui-state-default .btn-icon-chain-small, .ui-state-default .btn-icon-chain-unchain, .ui-state-default .btn-icon-chain, .ui-state-default .btn-icon-cross-circle, .ui-state-default .btn-icon-cross-circle_disabled, .ui-state-default .btn-icon-decline, .ui-state-default .btn-icon-decline_disabled, .ui-state-default .btn-icon-download-csv, .ui-state-default .btn-icon-drive-upload, .ui-state-default .btn-icon-drive-upload_disabled, .ui-state-default .btn-icon-magnifier, .ui-state-default .btn-icon-minus-circle, .ui-state-default .btn-icon-minus-circle_disabled, .ui-state-default .btn-icon-navigation, .ui-state-default .btn-icon-navigation_disabled, .ui-state-default .btn-icon-network-cloud, .ui-state-default .btn-icon-network-cloud_disabled, .ui-state-default .btn-icon-pencil, .ui-state-default .btn-icon-pencil_disabled, .ui-state-default .btn-icon-plug-disconnect-prohibition, .ui-state-default .btn-icon-plug-disconnect-prohibition_disabled, .ui-state-default .btn-icon-preview, .ui-state-default .btn-icon-preview_disabled, .ui-state-default .btn-icon-settings, .ui-state-default .btn-icon-settings_disabled, .ui-state-default .btn-icon-unpublish, .ui-state-default .btn-icon-unpublish_disabled { background: url('../images/btn-icon-sb5d07676ff.png') no-repeat; } +.btn-icon-sprite, .ui-state-default .btn-icon-accept, .ui-state-default .btn-icon-accept_disabled, .ui-state-default .btn-icon-add, .ui-state-default .btn-icon-add_disabled, .ui-state-default .btn-icon-addpage, .ui-state-default .btn-icon-addpage_disabled, .ui-state-default .btn-icon-arrow-circle-135-left, .ui-state-default .btn-icon-back, .ui-state-default .btn-icon-back_disabled, .ui-state-default .btn-icon-chain--arrow, .ui-state-default .btn-icon-chain--exclamation, .ui-state-default .btn-icon-chain--minus, .ui-state-default .btn-icon-chain--pencil, .ui-state-default .btn-icon-chain--plus, .ui-state-default .btn-icon-chain-small, .ui-state-default .btn-icon-chain-unchain, .ui-state-default .btn-icon-chain, .ui-state-default .btn-icon-cross-circle, .ui-state-default .btn-icon-cross-circle_disabled, .ui-state-default .btn-icon-decline, .ui-state-default .btn-icon-decline_disabled, .ui-state-default .btn-icon-download-csv, .ui-state-default .btn-icon-drive-upload, .ui-state-default .btn-icon-drive-upload_disabled, .ui-state-default .btn-icon-magnifier, .ui-state-default .btn-icon-minus-circle, .ui-state-default .btn-icon-minus-circle_disabled, .ui-state-default .btn-icon-navigation, .ui-state-default .btn-icon-navigation_disabled, .ui-state-default .btn-icon-network-cloud, .ui-state-default .btn-icon-network-cloud_disabled, .ui-state-default .btn-icon-pencil, .ui-state-default .btn-icon-pencil_disabled, .ui-state-default .btn-icon-plug-disconnect-prohibition, .ui-state-default .btn-icon-plug-disconnect-prohibition_disabled, .ui-state-default .btn-icon-preview, .ui-state-default .btn-icon-preview_disabled, .ui-state-default .btn-icon-settings, .ui-state-default .btn-icon-settings_disabled, .ui-state-default .btn-icon-unpublish, .ui-state-default .btn-icon-unpublish_disabled { background: url('../images/btn-icon-sc495ceeeca.png') no-repeat; } .ui-state-default .btn-icon-accept { background-position: 0 0; } .ui-state-default .btn-icon-accept_disabled { background-position: 0 -17px; } @@ -45,39 +45,39 @@ If more variables exist in the future, consider creating a variables file.*/ .ui-state-default .btn-icon-addpage_disabled { background-position: 0 -88px; } .ui-state-default .btn-icon-arrow-circle-135-left { background-position: 0 -104px; } .ui-state-default .btn-icon-back { background-position: 0 -120px; } -.ui-state-default .btn-icon-back_disabled { background-position: 0 -135px; } -.ui-state-default .btn-icon-chain--arrow { background-position: 0 -150px; } -.ui-state-default .btn-icon-chain--exclamation { background-position: 0 -166px; } -.ui-state-default .btn-icon-chain--minus { background-position: 0 -182px; } -.ui-state-default .btn-icon-chain--pencil { background-position: 0 -198px; } -.ui-state-default .btn-icon-chain--plus { background-position: 0 -214px; } -.ui-state-default .btn-icon-chain-small { background-position: 0 -230px; } -.ui-state-default .btn-icon-chain-unchain { background-position: 0 -246px; } -.ui-state-default .btn-icon-chain { background-position: 0 -262px; } -.ui-state-default .btn-icon-cross-circle { background-position: 0 -278px; } -.ui-state-default .btn-icon-cross-circle_disabled { background-position: 0 -294px; } -.ui-state-default .btn-icon-decline { background-position: 0 -310px; } -.ui-state-default .btn-icon-decline_disabled { background-position: 0 -327px; } -.ui-state-default .btn-icon-download-csv { background-position: 0 -344px; } -.ui-state-default .btn-icon-drive-upload { background-position: 0 -362px; } -.ui-state-default .btn-icon-drive-upload_disabled { background-position: 0 -378px; } -.ui-state-default .btn-icon-magnifier { background-position: 0 -394px; } -.ui-state-default .btn-icon-minus-circle { background-position: 0 -410px; } -.ui-state-default .btn-icon-minus-circle_disabled { background-position: 0 -426px; } -.ui-state-default .btn-icon-navigation { background-position: 0 -442px; } -.ui-state-default .btn-icon-navigation_disabled { background-position: 0 -458px; } -.ui-state-default .btn-icon-network-cloud { background-position: 0 -474px; } -.ui-state-default .btn-icon-network-cloud_disabled { background-position: 0 -490px; } -.ui-state-default .btn-icon-pencil { background-position: 0 -506px; } -.ui-state-default .btn-icon-pencil_disabled { background-position: 0 -522px; } -.ui-state-default .btn-icon-plug-disconnect-prohibition { background-position: 0 -538px; } -.ui-state-default .btn-icon-plug-disconnect-prohibition_disabled { background-position: 0 -554px; } -.ui-state-default .btn-icon-preview { background-position: 0 -570px; } -.ui-state-default .btn-icon-preview_disabled { background-position: 0 -587px; } -.ui-state-default .btn-icon-settings { background-position: 0 -604px; } -.ui-state-default .btn-icon-settings_disabled { background-position: 0 -620px; } -.ui-state-default .btn-icon-unpublish { background-position: 0 -636px; } -.ui-state-default .btn-icon-unpublish_disabled { background-position: 0 -654px; } +.ui-state-default .btn-icon-back_disabled { background-position: 0 -136px; } +.ui-state-default .btn-icon-chain--arrow { background-position: 0 -151px; } +.ui-state-default .btn-icon-chain--exclamation { background-position: 0 -167px; } +.ui-state-default .btn-icon-chain--minus { background-position: 0 -183px; } +.ui-state-default .btn-icon-chain--pencil { background-position: 0 -199px; } +.ui-state-default .btn-icon-chain--plus { background-position: 0 -215px; } +.ui-state-default .btn-icon-chain-small { background-position: 0 -231px; } +.ui-state-default .btn-icon-chain-unchain { background-position: 0 -247px; } +.ui-state-default .btn-icon-chain { background-position: 0 -263px; } +.ui-state-default .btn-icon-cross-circle { background-position: 0 -279px; } +.ui-state-default .btn-icon-cross-circle_disabled { background-position: 0 -295px; } +.ui-state-default .btn-icon-decline { background-position: 0 -311px; } +.ui-state-default .btn-icon-decline_disabled { background-position: 0 -328px; } +.ui-state-default .btn-icon-download-csv { background-position: 0 -345px; } +.ui-state-default .btn-icon-drive-upload { background-position: 0 -363px; } +.ui-state-default .btn-icon-drive-upload_disabled { background-position: 0 -379px; } +.ui-state-default .btn-icon-magnifier { background-position: 0 -395px; } +.ui-state-default .btn-icon-minus-circle { background-position: 0 -411px; } +.ui-state-default .btn-icon-minus-circle_disabled { background-position: 0 -427px; } +.ui-state-default .btn-icon-navigation { background-position: 0 -443px; } +.ui-state-default .btn-icon-navigation_disabled { background-position: 0 -459px; } +.ui-state-default .btn-icon-network-cloud { background-position: 0 -475px; } +.ui-state-default .btn-icon-network-cloud_disabled { background-position: 0 -491px; } +.ui-state-default .btn-icon-pencil { background-position: 0 -507px; } +.ui-state-default .btn-icon-pencil_disabled { background-position: 0 -523px; } +.ui-state-default .btn-icon-plug-disconnect-prohibition { background-position: 0 -539px; } +.ui-state-default .btn-icon-plug-disconnect-prohibition_disabled { background-position: 0 -555px; } +.ui-state-default .btn-icon-preview { background-position: 0 -571px; } +.ui-state-default .btn-icon-preview_disabled { background-position: 0 -588px; } +.ui-state-default .btn-icon-settings { background-position: 0 -605px; } +.ui-state-default .btn-icon-settings_disabled { background-position: 0 -621px; } +.ui-state-default .btn-icon-unpublish { background-position: 0 -637px; } +.ui-state-default .btn-icon-unpublish_disabled { background-position: 0 -655px; } .icon { text-indent: -9999px; border: none; outline: none; } .icon.icon-24 { width: 24px; height: 24px; background: url('../images/menu-icons/24x24-s546fcae8fd.png'); } @@ -178,7 +178,7 @@ form.small .field input.text, form.small .field textarea, form.small .field sele .cms input.loading, .cms button.loading, .cms input.ui-state-default.loading, .cms .ui-widget-content input.ui-state-default.loading, .cms .ui-widget-header input.ui-state-default.loading { color: #525252; border-color: #d5d3d3; cursor: default; } .cms input.loading .ui-icon, .cms button.loading .ui-icon, .cms input.ui-state-default.loading .ui-icon, .cms .ui-widget-content input.ui-state-default.loading .ui-icon, .cms .ui-widget-header input.ui-state-default.loading .ui-icon { background: transparent url(../../images/network-save.gif) no-repeat 0 0; } .cms input.loading.ss-ui-action-constructive .ui-icon, .cms button.loading.ss-ui-action-constructive .ui-icon { background: transparent url(../../images/network-save-constructive.gif) no-repeat 0 0; } -.cms .ss-ui-button { font-weight: bold; text-decoration: none; line-height: 16px; color: #393939; border: 1px solid #c0c0c2; border-bottom: 1px solid #a6a6a9; cursor: pointer; text-shadow: white 0 1px 1px; background-color: #e6e6e6; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Q5ZDlkOSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #d9d9d9)); background: -webkit-linear-gradient(#ffffff, #d9d9d9); background: -moz-linear-gradient(#ffffff, #d9d9d9); background: -o-linear-gradient(#ffffff, #d9d9d9); background: -ms-linear-gradient(#ffffff, #d9d9d9); background: linear-gradient(#ffffff, #d9d9d9); /* constructive */ /* destructive */ } +.cms .ss-ui-button { margin-top: 0px; font-weight: bold; text-decoration: none; line-height: 16px; color: #393939; border: 1px solid #c0c0c2; border-bottom: 1px solid #a6a6a9; cursor: pointer; text-shadow: white 0 1px 1px; background-color: #e6e6e6; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Q5ZDlkOSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #d9d9d9)); background: -webkit-linear-gradient(#ffffff, #d9d9d9); background: -moz-linear-gradient(#ffffff, #d9d9d9); background: -o-linear-gradient(#ffffff, #d9d9d9); background: -ms-linear-gradient(#ffffff, #d9d9d9); background: linear-gradient(#ffffff, #d9d9d9); /* constructive */ /* destructive */ } .cms .ss-ui-button.buttonset { margin: 0 -1px; } .cms .ss-ui-button.ui-state-hover, .cms .ss-ui-button:hover { text-decoration: none; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -o-linear-gradient(#ffffff, #e6e6e6); background: -ms-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3; -webkit-box-shadow: 0 0 5px #b3b3b3; -o-box-shadow: 0 0 5px #b3b3b3; box-shadow: 0 0 5px #b3b3b3; } .cms .ss-ui-button:active, .cms .ss-ui-button:focus, .cms .ss-ui-button.ui-state-active, .cms .ss-ui-button.ui-state-focus { border: 1px solid #b3b3b3; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -o-linear-gradient(#ffffff, #e6e6e6); background: -ms-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3 inset; -webkit-box-shadow: 0 0 5px #b3b3b3 inset; -o-box-shadow: 0 0 5px #b3b3b3 inset; box-shadow: 0 0 5px #b3b3b3 inset; } @@ -256,13 +256,13 @@ body.cms { overflow: hidden; } .cms-content-header { padding: 0px 8px 8px; height: 32px; z-index: 60; background-image: url(../images/textures/cms_content_header.png); background-repeat: repeat; } .cms-content-header a { color: #1556b2; } .cms-content-header .backlink { float: left; margin-top: 7px; } -.cms-content-header .backlink span.btn-icon-back { height: 15px; } +.cms-content-header .backlink span.btn-icon-back { height: 16px; } .cms-content-header h2 { float: left; padding: 8px 8px 0 8px; font-size: 14px; line-height: 24px; font-weight: bold; text-shadow: #bfcad2 1px 1px 0; max-width: 400px; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; o-text-overflow: ellipsis; } .cms-content-header > div { width: 9999em; overflow: hidden; } .cms-content-header .cms-content-header-tabs { position: fixed; right: 40px; } -.cms-content-header .cms-content-header-tabs .ui-tabs-nav li a { font-weight: bold; line-height: 16px; padding: 12px 20px 11px; } +.cms-content-header .cms-content-header-tabs .ui-tabs-nav li a { font-weight: bold; line-height: 16px; padding: 12px 20px 12px; } .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-state-default, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-widget-content .ui-state-default, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-widget-header .ui-state-default { border-top: none; } -.cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-state-active, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-widget-content .ui-state-active, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-widget-header .ui-state-active { border-top: none; } +.cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-state-active, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-widget-content .ui-state-active, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-widget-header .ui-state-active { border-top: none; padding-bottom: 0px; } .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-corner-all, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-corner-top, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-corner-right, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-corner-tr { border-radius: 0; } .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-corner-all, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-corner-top, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-corner-left, .cms-content-header .cms-content-header-tabs .ui-tabs-nav .ui-corner-tl { border-radius: 0; } @@ -312,6 +312,9 @@ body.cms { overflow: hidden; } /** -------------------------------------------- "Add page" dialog -------------------------------------------- */ .cms-page-add-form-dialog { display: none; } +.cms-add-form .step-label .flyout { height: 17px; padding-top: 5px; } +.cms-add-form .step-label .title { padding-top: 5px; font-weight: bold; text-shadow: 1px 1px 0 white; } +.cms-add-form ul.SelectionGroup { padding-left: 28px; } .cms-add-form .parent-mode { padding: 8px; overflow: auto; } .cms-add-form #PageType li { float: none; width: 100%; padding: 9px 0 9px 15px; overflow: hidden; border-bottom-width: 2px; border-bottom: 2px groove rgba(255, 255, 255, 0.8); -webkit-border-image: url(../images/textures/bg_fieldset_elements_border.png) 2 stretch stretch; border-image: url(../images/textures/bg_fieldset_elements_border.png) 2 stretch stretch; } .cms-add-form #PageType li:last-child { border-bottom: none; } @@ -394,6 +397,12 @@ body.cms { overflow: hidden; } .cms-preview-header { background-color: #FFBE66; padding: 10px; font-weight: bold; } /** -------------------------------------------- Member Profile -------------------------------------------- */ +form.member-profile-form { padding: 0 16px 0 0; } +form.member-profile-form .ui-tabs-nav .ui-state-default, form.member-profile-form .ui-tabs-nav .ui-widget-content .ui-state-default, form.member-profile-form .ui-tabs-nav .ui-widget-header .ui-state-default { border-top: none; } +form.member-profile-form #Root_Permissions { clear: both; padding: 16px; } +form.member-profile-form #Root_Main { clear: both; padding: 16px; } +form.member-profile-form #Root_Main .cms-help-toggle { text-indent: -9999em; display: inline-block; width: 20px; background: url(../images/question.png) no-repeat 0px 0px; } +form.member-profile-form #FavouritePageID { margin-top: 8px; } form.member-profile-form #CsvFile .middleColumn { background: none !important; } form.member-profile-form .advanced h4 { margin-bottom: .5em; } form.member-profile-form .Actions { text-align: left; border: 0; } @@ -406,12 +415,15 @@ form.member-profile-form #Groups .middleColumn { margin-left: 0; width: 100%; } form.member-profile-form #Groups .middleColumn .TreeDropdownField { width: 90%; max-width: 90%; } form.member-profile-form #Permissions .optionset li { float: none; width: auto; } form.member-profile-form .ui-tabs-nav li { margin: 0 0 -1px 0; } -form.member-profile-form .ui-corner-all, form.member-profile-form .ui-corner-top, form.member-profile-form .ui-corner-right, form.member-profile-form .ui-corner-tr { border-radius: 0; } -form.member-profile-form .ui-corner-all, form.member-profile-form .ui-corner-top, form.member-profile-form .ui-corner-left, form.member-profile-form .ui-corner-tl { border-radius: 0; } +form.member-profile-form .ui-tabs-nav .ui-corner-all, form.member-profile-form .ui-tabs-nav .ui-corner-top, form.member-profile-form .ui-tabs-nav .ui-corner-right, form.member-profile-form .ui-tabs-nav .ui-corner-tr { border-radius: 0; } +form.member-profile-form .ui-tabs-nav .ui-corner-all, form.member-profile-form .ui-tabs-nav .ui-corner-top, form.member-profile-form .ui-tabs-nav .ui-corner-left, form.member-profile-form .ui-tabs-nav .ui-corner-tl { border-radius: 0; } .cms .cms-content { border-right: 1px solid rgba(201, 205, 206, 0.8); -moz-box-shadow: 3px 0 4px rgba(0, 0, 0, 0.15); -webkit-box-shadow: 3px 0 4px rgba(0, 0, 0, 0.15); -o-box-shadow: 3px 0 4px rgba(0, 0, 0, 0.15); box-shadow: 3px 0 4px rgba(0, 0, 0, 0.15); -moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; -ms-border-radius: 0; -khtml-border-radius: 0; border-radius: 0; } -.cms .cms-content-fields { /* always show a y scroll bar as popups like TreeDropdowns can trigger longer pages and the extra scroll bar doesn't fire our sizing bar */ overflow-y: auto; overflow-x: auto; background: none; width: 100%; } -.cms .cms-content-fields .aligned-right-label { margin-left: 184px; padding: 8px 0; } +.cms .cms-content-fields { overflow-y: auto; overflow-x: auto; background: none; width: 100%; } +.cms .cms-content-fields #Root_Main .confirmedpassword { border-bottom: none; box-shadow: none; } +.cms .cms-content-fields #Root_Main .customFormat { max-width: 80px; } +.cms .cms-content-fields #Root_Main .cms-help-toggle { text-indent: -9999em; display: inline-block; width: 20px; background: url(../images/question.png) no-repeat 0px 0px; } +.cms .cms-content-fields #Root_Permissions ul.optionset li { float: none; } /** -------------------------------------------- "Settings" Form -------------------------------------------- */ #CanViewType .optionset li, #CanEditType .optionset li, #CanCreateTopLevelType .optionset li { float: none; width: auto; white-space: nowrap; } @@ -450,6 +462,8 @@ form.member-profile-form .ui-corner-all, form.member-profile-form .ui-corner-top .cms .ui-widget-overlay { background-color: #000; background-image: none; } +.cms .ui-dialog .ss-ui-dialog.ui-dialog-content { padding-top: 0px; } + .ui-dialog { background: url("../images/textures/bg_cms_main_content.png") repeat left top #f0f3f4; border: 3px solid #000 !important; border-radius: 8px; overflow: visible; padding: 0; } .ui-dialog .ui-dialog-titlebar.ui-widget-header { font-size: 14px; background-color: #92a5b2; padding: 4px 4px 4px 16px; border-bottom: 2px solid #8399a7; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2NlZDdkYyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzkyYTViMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ced7dc), color-stop(100%, #92a5b2)); background-image: -webkit-linear-gradient(#ced7dc, #92a5b2); background-image: -moz-linear-gradient(#ced7dc, #92a5b2); background-image: -o-linear-gradient(#ced7dc, #92a5b2); background-image: -ms-linear-gradient(#ced7dc, #92a5b2); background-image: linear-gradient(#ced7dc, #92a5b2); } .ui-dialog.loading { background-image: url(../images/spinner.gif); background-position: 50% 50%; background-repeat: no-repeat; } @@ -461,7 +475,7 @@ body.cms-dialog { overflow: auto; background: url("../images/textures/bg_cms_mai .cms-dialog-content .ss-tabset { z-index: 60; -moz-border-radius: none; -webkit-border-radius: none; -o-border-radius: none; -ms-border-radius: none; -khtml-border-radius: none; border-radius: none; } .cms-dialog-content .ss-tabset .tab { background: none; overflow-y: auto; } .cms-dialog-content .ss-tabset.ui-tabs { background: none; } -.cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav { padding: 8px 0 0 0; border: none; } +.cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav { border: none; padding: 0 40px 0 0; float: right; } .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav li { font-weight: bold; line-height: 16px; padding: 11px 12px 9px; border-bottom: 2px solid #B3B3B3; } .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: -1px; } .cms-dialog-content .ss-tabset.ui-tabs .ui-tabs-nav li:first-child { margin-left: 15px; } @@ -517,6 +531,9 @@ form.import-form ul li { margin-left: 20px; } form.import-form p { margin-bottom: 5px; } form.import-form label.left { width: 250px; } +/** -------------------------------------------- Page Edit Controller -------------------------------------------- */ +.cms-container .CMSMain.CMSPageEditController { margin-left: -1px; } + /** This file defines the jstree base styling (see http://jstree.com), as well as any customizations (see bottom of file). The styles are usually added through jstree.js on DOM load, but we need it earlier in order to correctly display the uninitialized tree. */ .cms .jstree ul, .TreeDropdownField .treedropdownfield-panel .jstree ul { display: block; margin: 0; padding: 0; background: none; list-style-type: none; } .cms .jstree li, .TreeDropdownField .treedropdownfield-panel .jstree li { display: block; margin: 0; padding: 0; list-style-type: none; display: block; min-height: 18px; line-height: 18px; white-space: nowrap; margin-left: 18px; min-width: 18px; } @@ -605,8 +622,8 @@ form.import-form label.left { width: 250px; } .tree-holder.jstree-apple li, .cms-tree.jstree-apple li { padding: 0px; clear: left; } .tree-holder.jstree-apple ins, .cms-tree.jstree-apple ins { background-color: transparent; background-image: url(../images/sitetree_ss_default_icons.png); } .tree-holder.jstree-apple li.jstree-checked > a, .tree-holder.jstree-apple li.jstree-checked > a:link, .cms-tree.jstree-apple li.jstree-checked > a, .cms-tree.jstree-apple li.jstree-checked > a:link { background-color: #efe999; } -.tree-holder.jstree-apple .jstree-closed > ins, .cms-tree.jstree-apple .jstree-closed > ins { background-position: 0 0; } -.tree-holder.jstree-apple .jstree-open > ins, .cms-tree.jstree-apple .jstree-open > ins { background-position: -20px 0; } +.tree-holder.jstree-apple .jstree-closed > ins, .cms-tree.jstree-apple .jstree-closed > ins { background-position: 0 0; cursor: pointer; } +.tree-holder.jstree-apple .jstree-open > ins, .cms-tree.jstree-apple .jstree-open > ins { background-position: -20px 0; cursor: pointer; } a .jstree-pageicon { display: block; float: left; width: 16px; height: 16px; margin-right: 4px; background-color: transparent; background-image: url(../images/sitetree_ss_pageclass_icons_default.png); background-repeat: no-repeat; } diff --git a/admin/images/btn-icon-sb5d07676ff.png b/admin/images/btn-icon-sb5d07676ff.png deleted file mode 100644 index 6e9b49a31..000000000 Binary files a/admin/images/btn-icon-sb5d07676ff.png and /dev/null differ diff --git a/admin/images/btn-icon-sc495ceeeca.png b/admin/images/btn-icon-sc495ceeeca.png new file mode 100644 index 000000000..7f27b0297 Binary files /dev/null and b/admin/images/btn-icon-sc495ceeeca.png differ diff --git a/admin/images/btn-icon/addpage.png b/admin/images/btn-icon/addpage.png index 3dae3ddcc..554433e84 100644 Binary files a/admin/images/btn-icon/addpage.png and b/admin/images/btn-icon/addpage.png differ diff --git a/admin/images/btn-icon/back.png b/admin/images/btn-icon/back.png old mode 100644 new mode 100755 index 019b175ca..e3f39762c Binary files a/admin/images/btn-icon/back.png and b/admin/images/btn-icon/back.png differ diff --git a/admin/images/question.png b/admin/images/question.png new file mode 100755 index 000000000..f51f15ba3 Binary files /dev/null and b/admin/images/question.png differ diff --git a/admin/javascript/LeftAndMain.Content.js b/admin/javascript/LeftAndMain.Content.js index 2852be827..fb6c8a391 100644 --- a/admin/javascript/LeftAndMain.Content.js +++ b/admin/javascript/LeftAndMain.Content.js @@ -142,6 +142,11 @@ var formData = form.serializeArray(); // add button action formData.push({name: $(button).attr('name'), value:'1'}); + // Artificial HTTP referer, IE doesn't submit them via ajax. + // Also rewrites anchors to their page counterparts, which is important + // as automatic browser ajax response redirects seem to discard the hash/fragment. + formData.push({name: 'BackURL', value:History.getPageUrl()}); + jQuery.ajax(jQuery.extend({ url: form.attr('action'), data: formData, @@ -159,12 +164,6 @@ self.submitForm_responseHandler(form, xmlhttp.responseText, status, xmlhttp, formData); } - // Simulates a redirect on an ajax response - just exchange the URL without re-requesting it - if(window.History.enabled) { - var url = xmlhttp.getResponseHeader('X-ControllerURL'); - if(url) window.history.replaceState({}, '', url); - } - // Re-init tabs (in case the form tag itself is a tabset) if(self.hasClass('ss-tabset')) self.removeClass('ss-tabset').addClass('ss-tabset'); @@ -287,7 +286,7 @@ var url = $(node).find('a:first').attr('href'); if(url && url != '#') { - if($(node).find('a:first').is(':internal')) url = url = $.path.makeUrlAbsolute(url, $('base').attr('href')); + if($.path.isExternal($(node).find('a:first'))) url = url = $.path.makeUrlAbsolute(url, $('base').attr('href')); // Reload only edit form if it exists (side-by-side view of tree and edit view), otherwise reload whole panel if(container.find('.cms-edit-form').length) { url += '?cms-view-form=1'; @@ -311,4 +310,4 @@ } }); -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/admin/javascript/LeftAndMain.Menu.js b/admin/javascript/LeftAndMain.Menu.js index aeb8226f1..7f6792d63 100644 --- a/admin/javascript/LeftAndMain.Menu.js +++ b/admin/javascript/LeftAndMain.Menu.js @@ -207,16 +207,16 @@ onclick: function(e) { // Only catch left clicks, in order to allow opening in tabs. // Ignore external links, fallback to standard link behaviour - if(e.which > 1 || this.is(':external')) return; + var isExternal = $.path.isExternal(this.attr('href')); + if(e.which > 1 || isExternal) return; e.preventDefault(); var item = this.getMenuItem(); var url = this.attr('href'); - if(this.is(':internal')) url = $('base').attr('href') + url; + if(!isExternal) url = $('base').attr('href') + url; var children = item.find('li'); - if(children.length) { children.first().find('a').click(); } else { @@ -261,8 +261,4 @@ }); }); - - // Internal Helper - $.expr[':'].internal = function(obj){return obj.href.match(/^mailto\:/) || (obj.hostname == location.hostname);}; - $.expr[':'].external = function(obj){return !$(obj).is(':internal');}; }(jQuery)); \ No newline at end of file diff --git a/admin/javascript/LeftAndMain.js b/admin/javascript/LeftAndMain.js index 340978ff1..ffdd578e6 100644 --- a/admin/javascript/LeftAndMain.js +++ b/admin/javascript/LeftAndMain.js @@ -18,12 +18,28 @@ jQuery.noConflict(); spinner.show(); }; + // apply an select element only when it is ready, ie. when it is rendered into a template + // with css applied and got a width value. + var applyChosen = function(el){ + if(el.outerWidth()){ + el.chosen().addClass("has-chzn"); + // Copy over title attribute if required + if(el.attr('title')) el.siblings('.chzn-container').attr('title', el.attr('title')); + } else { + setTimeout(function() {applyChosen(el);},500); + } + }; + $(window).bind('resize', positionLoadingSpinner).trigger('resize'); // global ajax error handlers $.ajaxSetup({ error: function(xmlhttp, status, error) { - var msg = (xmlhttp.getResponseHeader('X-Status')) ? xmlhttp.getResponseHeader('X-Status') : xmlhttp.statusText; + if(xmlhttp.status < 200 || xmlhttp.status > 399) { + var msg = (xmlhttp.getResponseHeader('X-Status')) ? xmlhttp.getResponseHeader('X-Status') : xmlhttp.statusText; + } else { + msg = error; + } statusMessage(msg, 'bad'); } }); @@ -72,7 +88,8 @@ jQuery.noConflict(); $('.cms-edit-form').live('reloadeditform', function(e, data) { // Simulates a redirect on an ajax response - just exchange the URL without re-requesting it - if(window.History.enabled) { + // Causes non-pushState browser to re-request the URL, so ignore for those. + if(window.History.enabled && !History.emulated.pushState) { var url = data.xmlhttp.getResponseHeader('X-ControllerURL'); if(url) window.history.replaceState({}, '', url); } @@ -207,12 +224,13 @@ jQuery.noConflict(); var layoutClasses = ['east', 'west', 'center', 'north', 'south']; var elemClasses = contentEl.attr('class'); - var origLayoutClasses = $.grep( - elemClasses.split(' '), - function(val) { - return ($.inArray(val, layoutClasses) >= 0); - } - ); + var origLayoutClasses = []; + if(elemClasses) { + origLayoutClasses = $.grep( + elemClasses.split(' '), + function(val) { return ($.inArray(val, layoutClasses) >= 0);} + ); + } newContentEl .removeClass(layoutClasses.join(' ')) @@ -233,12 +251,13 @@ jQuery.noConflict(); newContentEl.css('visibility', 'visible'); newContentEl.removeClass('loading'); - // Simulates a redirect on an ajax response - just exchange the URL without re-requesting it - if(window.History.enabled) { + // Simulates a redirect on an ajax response - just exchange the URL without re-requesting it. + // Causes non-pushState browser to re-request the URL, so ignore for those. + if(window.History.enabled && !History.emulated.pushState) { var url = xhr.getResponseHeader('X-ControllerURL'); - if(url) window.history.replaceState({}, '', url); + if(url) window.History.replaceState({}, '', url); } - + self.trigger('afterstatechange', {data: data, status: status, xhr: xhr, element: newContentEl}); }, error: function(xhr, status, e) { @@ -452,8 +471,8 @@ jQuery.noConflict(); // Explicitly disable default placeholder if no custom one is defined if(!this.data('placeholder')) this.data('placeholder', ' '); - // Apply chosen - this.chosen().addClass("has-chzn"); + // Apply Chosen + applyChosen(this); this._super(); } @@ -538,4 +557,4 @@ var statusMessage = function(text, type) { var errorMessage = function(text) { jQuery.noticeAdd({text: text, type: 'error'}); -}; \ No newline at end of file +}; diff --git a/admin/javascript/ModelAdmin.js b/admin/javascript/ModelAdmin.js index a5b8a9b37..306c584e1 100644 --- a/admin/javascript/ModelAdmin.js +++ b/admin/javascript/ModelAdmin.js @@ -4,6 +4,13 @@ (function($) { $.entwine('ss', function($){ + $('#cms-content-tools #Form_SearchForm').entwine({ + onsubmit: function(e) { + //We need to trigger handleStateChange() explicitly, otherwise handleStageChange() + //doesn't called if landing from another section of cms + this.trigger('beforeSubmit'); + } + }); /** * Class: .importSpec @@ -21,6 +28,5 @@ this._super(); } }); - }); })(jQuery); \ No newline at end of file diff --git a/admin/javascript/lib.js b/admin/javascript/lib.js index 6df032e0c..c6437cc7e 100644 --- a/admin/javascript/lib.js +++ b/admin/javascript/lib.js @@ -232,8 +232,4 @@ }; $.path = path; - - // Internal Helper - $.expr[':'].internal = function(obj){return obj.href.match(/^mailto\:/) || (obj.hostname == location.hostname);}; - $.expr[':'].external = function(obj){return !$(obj).is(':internal')}; }(jQuery)); \ No newline at end of file diff --git a/admin/scss/_forms.scss b/admin/scss/_forms.scss index 641431145..520dd5292 100644 --- a/admin/scss/_forms.scss +++ b/admin/scss/_forms.scss @@ -275,7 +275,7 @@ form.small .field, .field.small { } .ss-ui-button { - + margin-top:0px; &.buttonset { margin: 0 -1px; // hack to avoid double borders } diff --git a/admin/scss/_style.scss b/admin/scss/_style.scss index dce375150..77c6f9a06 100644 --- a/admin/scss/_style.scss +++ b/admin/scss/_style.scss @@ -100,7 +100,7 @@ body.cms { float:left; margin-top:$grid-x - 1; span.btn-icon-back { - height:15px; + height:16px; } } @@ -129,7 +129,7 @@ body.cms { a { font-weight: bold; line-height: $grid-y * 2; - padding: ($grid-y * 2 - 4) ($grid-x * 2 + 4) $grid-y + 3; + padding: $grid-y*1.5 $grid-x*2.5 $grid-y*1.5; } } @@ -147,6 +147,7 @@ body.cms { border: { top:none; } + padding-bottom:0px; } .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { border-radius:0; @@ -407,6 +408,20 @@ body.cms { } .cms-add-form { + .step-label { + .flyout { + height:17px; //centres number within the grey arrow + padding-top:5px; + } + .title { + padding-top:5px; //aligns label with point of arrow + font-weight:bold; //to match pagetype label + @include text-shadow(1px 1px 0 $color-text-shadow); + } + } + ul.SelectionGroup { + padding-left:28px; + } .parent-mode { padding: $grid-x; overflow: auto; @@ -822,7 +837,37 @@ body.cms { * -------------------------------------------- */ form.member-profile-form { - + padding: 0 $grid-x*2 0 0; + .ui-tabs-nav { + .ui-state-default, + .ui-widget-content .ui-state-default, + .ui-widget-header .ui-state-default { + border: { + top:none; + } + } + } + + #Root_Permissions { + clear:both; + padding: $grid-x*2; + } + + #Root_Main { + clear:both; + padding: $grid-x*2; + .cms-help-toggle { + text-indent: -9999em; + display: inline-block; + width: 20px; + background:url(../images/question.png) no-repeat 0px 0px; + } + } + + #FavouritePageID { + margin-top:$grid-y; + } + #CsvFile .middleColumn { background: none !important; } @@ -888,13 +933,13 @@ form.member-profile-form { li { margin:0 0 -1px 0; } - } - .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { - border-radius:0; - } + .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { + border-radius:0; + } - .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { - border-radius:0; + .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { + border-radius:0; + } } } @@ -907,17 +952,32 @@ form.member-profile-form { } .cms-content-fields { - /* always show a y scroll bar as popups like TreeDropdowns - can trigger longer pages and the extra scroll bar doesn't - fire our sizing bar */ + // always show a y scroll bar as popups like TreeDropdowns + // can trigger longer pages and the extra scroll bar doesn't fire our sizing bar overflow-y: auto; overflow-x: auto; background: none; width:100%; - .aligned-right-label { - margin-left:$grid-x*23; - padding:$grid-x 0; + #Root_Main { + .confirmedpassword { + border-bottom:none; + box-shadow:none; + } + .customFormat { + max-width:80px; + } + .cms-help-toggle { + text-indent: -9999em; + display: inline-block; + width: 20px; + background:url(../images/question.png) no-repeat 0px 0px; + } } + #Root_Permissions{ + ul.optionset li { + float:none; + } + } } } @@ -1092,6 +1152,10 @@ form.member-profile-form { background-image: none; } +.cms .ui-dialog .ss-ui-dialog.ui-dialog-content { + padding-top: 0px; //removes padding so that tabs are flush with header +} + // Elements with this class can either frame inline markup or an iframe, // most styles should be applied to .cms-dialog instead (which declares the content in the frame) .ui-dialog { @@ -1147,8 +1211,9 @@ body.cms-dialog { background: none; .ui-tabs-nav { - padding: $grid-x 0 0 0; border: none; + padding: 0 $grid-x*5 0 0; //allows for 40px gap to the right of tabs to match the tabs on main CMS + float: right; li { &.ui-tabs-selected { @@ -1391,5 +1456,14 @@ form.import-form { label.left { width: 250px; } + } +/** -------------------------------------------- + * Page Edit Controller + * -------------------------------------------- */ + +.cms-container .CMSMain.CMSPageEditController { + // Fix pixel gap between nav tree and main page header + margin-left:-1px; +} diff --git a/admin/scss/_tree.scss b/admin/scss/_tree.scss index aa6f6cad8..00b48c807 100644 --- a/admin/scss/_tree.scss +++ b/admin/scss/_tree.scss @@ -24,8 +24,14 @@ min-height: 18px; line-height: 18px; white-space: nowrap; - margin-left: 18px; min-width: 18px; + + li { + margin: 0; + } + li li { + margin-left: 10px; + } } ins { display: inline-block; @@ -240,7 +246,7 @@ } li.jstree-open > ul { display: block; - margin-left:-13px; + li ul { margin-left:2px; } @@ -535,11 +541,13 @@ } & .jstree-closed > ins { - background-position:0 0; + background-position:0 0; + cursor:pointer; } & .jstree-open > ins { - background-position:-20px 0; + background-position:-20px 0; + cursor:pointer; } } diff --git a/admin/scss/ie7.scss b/admin/scss/ie7.scss index b25afb383..1f7e9b434 100644 --- a/admin/scss/ie7.scss +++ b/admin/scss/ie7.scss @@ -68,10 +68,16 @@ html { text-indent: 0px !important; } -//fix for filter and reset icons on datagrid - -.cms table.ss-gridfield-table tr th.extra span input { - height:23px; +.cms table.ss-gridfield-table { + tbody td { + // Overrule width: 100% setting to trigger "shrink fit" + // of button row, which IE7 doesn't support + width: auto; + } + tr th.extra span input { + //fix for filter and reset icons on datagrid + height:23px; + } } .ss-gridfield-button-filter.ss-ui-button { diff --git a/admin/scss/themes/_default.scss b/admin/scss/themes/_default.scss index 82285412c..cab053679 100644 --- a/admin/scss/themes/_default.scss +++ b/admin/scss/themes/_default.scss @@ -7,69 +7,69 @@ /** ----------------------------------------------- * Colours * ------------------------------------------------ */ -$color-base: #b0bec7; -$color-widget-bg: lighten($color-base, 20%); +$color-base: #b0bec7 !default; +$color-widget-bg: lighten($color-base, 20%) !default; -$color-dark-bg: #003050; -$color-dark-separator: #19435c; -$color-medium-separator: #808080; -$color-light-separator: rgba(201, 205, 206, 0.8); +$color-dark-bg: #003050 !default; +$color-dark-separator: #19435c !default; +$color-medium-separator: #808080 !default; +$color-light-separator: rgba(201, 205, 206, 0.8) !default; -$color-tab: #d9d9d9; -$color-dark-grey: #7B8C91; +$color-tab: #d9d9d9 !default; +$color-dark-grey: #7B8C91 !default; -$color-shadow-light: rgba(201, 205, 206, 0.8); -$color-shadow-dark: rgba(107, 120, 123, 0.5); +$color-shadow-light: rgba(201, 205, 206, 0.8) !default; +$color-shadow-dark: rgba(107, 120, 123, 0.5) !default; -$color-highlight: #FFFF66; -$color-highlight-opacity: rgba(255, 255, 102, 0.3); +$color-highlight: #FFFF66 !default; +$color-highlight-opacity: rgba(255, 255, 102, 0.3) !default; -$color-menu-button: #338DC1; -$color-menu-background: #c6d7df; -$color-menu-border: #8c99a1; +$color-menu-button: #338DC1 !default; +$color-menu-background: #c6d7df !default; +$color-menu-border: #8c99a1 !default; -$color-text: #444; -$color-text-light: white; -$color-text-light-link: white; -$color-text-disabled: #aaa; -$color-text-dark: #1f1f1f; -$color-text-dark-link: #3EBAE0; -$color-text-blue-link:#1556B2; -$color-text-shadow: white; +$color-text: #444 !default; +$color-text-light: white !default; +$color-text-light-link: white !default; +$color-text-disabled: #aaa !default; +$color-text-dark: #1f1f1f !default; +$color-text-dark-link: #3EBAE0 !default; +$color-text-blue-link:#1556B2 !default; +$color-text-shadow: white !default; -$color-button-generic: #e6e6e6; -$color-button-generic-border: #c0c0c2; +$color-button-generic: #e6e6e6 !default; +$color-button-generic-border: #c0c0c2 !default; -$color-button-highlight: #e6e6e6; -$color-button-highlight-border: #708284; +$color-button-highlight: #e6e6e6 !default; +$color-button-highlight-border: #708284 !default; -$color-button-constructive: #669933; -$color-button-constructive-border: #78a127; +$color-button-constructive: #669933 !default; +$color-button-constructive-border: #78a127 !default; -$color-button-destructive: #f00; +$color-button-destructive: #f00 !default; -$color-button-disabled: #eeeded; +$color-button-disabled: #eeeded !default; -$color-warning: #FF9300; -$color-error: #FF9300; -$color-notice: #FF9300; -$color-good: $color-button-constructive; +$color-warning: #FF9300 !default; +$color-error: #FF9300 !default; +$color-notice: #FF9300 !default; +$color-good: $color-button-constructive !default; -$color-cms-batchactions-menu-background: #f5f5f5; -$color-cms-batchactions-menu-selected-background: #efe999; +$color-cms-batchactions-menu-background: #f5f5f5 !default; +$color-cms-batchactions-menu-selected-background: #efe999 !default; /** ----------------------------------------------- * Textures * ----------------------------------------------- */ -$tab-panel-texture-color: #f0f3f4; -$tab-panel-texture-background: $tab-panel-texture-color url(../images/textures/bg_cms_main_content.png) repeat top left; +$tab-panel-texture-color: #f0f3f4 !default; +$tab-panel-texture-background: $tab-panel-texture-color url(../images/textures/bg_cms_main_content.png) repeat top left !default; /** ----------------------------------------------- * Typography. * ------------------------------------------------ */ -$font-family: Arial, sans-serif; -$font-base-size: 12px; +$font-family: Arial, sans-serif !default; +$font-base-size: 12px !default; /** ----------------------------------------------- * Grid Units (px) @@ -78,10 +78,10 @@ $font-base-size: 12px; * both x (=horizontal) and y (=vertical). All internal padding and * margins are scaled to this and accounting for paragraphs * ------------------------------------------------ */ -$grid-y: 8px; -$grid-x: 8px; +$grid-y: 8px !default; +$grid-x: 8px !default; /** ----------------------------------------------- * Application Logo (CMS Logo) Must be 24px x 24px * ------------------------------------------------ */ -$application-logo-small: url("../images/logo_small.png"); +$application-logo-small: url("../images/logo_small.png") !default; diff --git a/admin/templates/Includes/LeftAndMain_Menu.ss b/admin/templates/Includes/LeftAndMain_Menu.ss index 9e5abf2f1..45b5d6cb9 100644 --- a/admin/templates/Includes/LeftAndMain_Menu.ss +++ b/admin/templates/Includes/LeftAndMain_Menu.ss @@ -58,7 +58,7 @@
=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(o=0,q=e.length;o "+b.html.substr(j+i.length),k=k.substr(0,j)+""+k.substr(j)):k=b.html,$(g).innerHTML!==k&&$(g).update(k),this.result_activate($(g)),b.group_array_index!=null&&$(this.results_data[b.group_array_index].dom_id).setStyle({display:"list-item"})):($(g)===this.result_highlight&&this.result_clear_highlight(),this.result_deactivate($(g)))}}return h<1&&i.length?this.no_results(i):this.winnow_results_set_highlight()},d.prototype.winnow_results_clear=function(){var a,b,c,d,e;this.search_field.clear(),b=this.search_results.select("li"),e=[];for(c=0,d=b.length;c Using Chosen is easy as can be."+c.html.substr(k+j.length),l=l.substr(0,k)+""+l.substr(k)):l=c.html,g.html(l),this.result_activate(g),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&h===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(g))}}return i<1&&j.length?this.no_results(j):this.winnow_results_set_highlight()},e.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d
=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(p=0,r=e.length;p
diff --git a/admin/thirdparty/chosen/package.json b/admin/thirdparty/chosen/package.json
index a26bb42c8..a97f4f48b 100644
--- a/admin/thirdparty/chosen/package.json
+++ b/admin/thirdparty/chosen/package.json
@@ -1,7 +1,7 @@
{
"author": "harvest",
"name": "chosen",
- "version": "0.9.7",
+ "version": "0.9.8",
"description": "Chosen is a JavaScript plugin that makes long, unwieldy select boxes much more user-friendly. It is currently available in both jQuery and Prototype flavors.",
"repository": {
"type": "git",
diff --git a/admin/thirdparty/history-js/scripts/uncompressed/history.html4.js b/admin/thirdparty/history-js/scripts/uncompressed/history.html4.js
index 6d8d4274a..709d9b887 100644
--- a/admin/thirdparty/history-js/scripts/uncompressed/history.html4.js
+++ b/admin/thirdparty/history-js/scripts/uncompressed/history.html4.js
@@ -429,7 +429,10 @@
}
// Create State
- currentState = History.extractState(History.getFullUrl(currentHash||document.location.href,false),true);
+ // MODIFIED ischommer: URL normalization needs to respect our
* //Database request for the object
- * $myDoSet = DataObject::get("FooBars","");
+ * $myDoSet = DataList::create("FooBars","");
* if($myDoSet){
* // This returns an array of ID => Title
- * $map = $myDoSet->toDropDownMap();
+ * $map = $myDoSet->map();
*
* // Instantiate the OptionsetField
* $FieldList = new FieldList(
diff --git a/forms/TreeDropdownField.php b/forms/TreeDropdownField.php
index 73282d113..2f62d7c8e 100644
--- a/forms/TreeDropdownField.php
+++ b/forms/TreeDropdownField.php
@@ -343,7 +343,7 @@ class TreeDropdownField extends FormField {
class TreeDropdownField_Readonly extends TreeDropdownField {
protected $readonly = true;
- function Field() {
+ function Field($properties = array()) {
$fieldName = $this->labelField;
if($this->value) {
$keyObj = $this->objectForKey($this->value);
@@ -361,4 +361,4 @@ class TreeDropdownField_Readonly extends TreeDropdownField {
$field->setForm($this->form);
return $field->Field();
}
-}
\ No newline at end of file
+}
diff --git a/javascript/HtmlEditorField.js b/javascript/HtmlEditorField.js
index 16b3bd770..e6852b574 100644
--- a/javascript/HtmlEditorField.js
+++ b/javascript/HtmlEditorField.js
@@ -782,8 +782,8 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
return {
'src' : this.find(':input[name=URL]').val(),
'alt' : this.find(':input[name=AltText]').val(),
- 'width' : width ? parseInt(width, 10) + "px" : null,
- 'height' : height ? parseInt(height, 10) + "px" : null,
+ 'width' : width ? parseInt(width, 10) : null,
+ 'height' : height ? parseInt(height, 10) : null,
'title' : this.find(':input[name=Title]').val(),
'class' : this.find(':input[name=CSSClass]').val()
};
diff --git a/javascript/lang/en_US.js b/javascript/lang/en_US.js
index efabd2c6e..3f5967af8 100644
--- a/javascript/lang/en_US.js
+++ b/javascript/lang/en_US.js
@@ -11,6 +11,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
'UNIQUEFIELD.CANNOTLEAVEEMPTY': 'This field cannot be left empty',
'RESTRICTEDTEXTFIELD.CHARCANTBEUSED': "The character '%s' cannot be used in this field",
'UPDATEURL.CONFIRM': 'Would you like me to change the URL to:\n\n%s/\n\nClick Ok to change the URL, click Cancel to leave it as:\n\n%s',
+ 'UPDATEURL.CONFIRMURLCHANGED':'The URL has been changed to\n"%s"',
'FILEIFRAMEFIELD.DELETEFILE': 'Delete File',
'FILEIFRAMEFIELD.UNATTACHFILE': 'Un-Attach File',
'FILEIFRAMEFIELD.DELETEIMAGE': 'Delete Image',
diff --git a/model/Aggregate.php b/model/Aggregate.php
index 77a483db3..e2fd134ff 100644
--- a/model/Aggregate.php
+++ b/model/Aggregate.php
@@ -90,7 +90,7 @@ class Aggregate extends ViewableData {
* This gets the aggregate function
*
*/
- public function XML_val($name, $args) {
+ public function XML_val($name, $args = null, $cache = false) {
$func = strtoupper( strpos($name, 'get') === 0 ? substr($name, 3) : $name );
$attribute = $args ? $args[0] : 'ID';
diff --git a/model/DataExtension.php b/model/DataExtension.php
index 614825997..7d8e9c172 100644
--- a/model/DataExtension.php
+++ b/model/DataExtension.php
@@ -131,7 +131,7 @@ abstract class DataExtension extends Extension {
* @return array Returns a map where the keys are db, has_one, etc, and
* the values are additional fields/relations to be defined.
*/
- function extraStatics($class=null, $extension=null) {
+ function extraStatics($class = null, $extension = null) {
return array();
}
diff --git a/model/DataList.php b/model/DataList.php
index 1984af0df..721cedd50 100644
--- a/model/DataList.php
+++ b/model/DataList.php
@@ -658,7 +658,7 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab
*
* Example: Get members from all Groups:
*
- * DataObject::get("Group")->relation("Members")
+ * DataList::Create("Group")->relation("Members")
*
* @param string $relationName
* @return HasManyList|ManyManyList
@@ -668,6 +668,10 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab
return singleton($this->dataClass)->$relationName()->forForeignID($ids);
}
+ function dbObject($fieldName) {
+ return singleton($this->dataClass)->dbObject($fieldName);
+ }
+
/**
* Add a number of items to the component set.
*
diff --git a/model/DataObject.php b/model/DataObject.php
index 24c98d805..024a01e15 100644
--- a/model/DataObject.php
+++ b/model/DataObject.php
@@ -309,7 +309,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
else $passed = "The value '$record'";
user_error("DataObject::__construct passed $passed. It's supposed to be passed an array,
- taken straight from the database. Perhaps you should use DataObject::get_one instead?", E_USER_WARNING);
+ taken straight from the database. Perhaps you should use DataList::create()->First(); instead?", E_USER_WARNING);
$record = null;
}
@@ -2404,7 +2404,12 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
// Traverse dot syntax
$component = $this;
foreach($parts as $relation) {
- $component = $component->$relation();
+ if($component instanceof SS_List) {
+ if(method_exists($component,$relation)) $component = $component->$relation();
+ else $component = $component->relation($relation);
+ } else {
+ $component = $component->$relation();
+ }
}
$object = $component->dbObject($fieldName);
@@ -2436,7 +2441,12 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
// Traverse dot syntax
$component = $this;
foreach($parts as $relation) {
- $component = $component->$relation();
+ if($component instanceof SS_List) {
+ if(method_exists($component,$relation)) $component = $component->$relation();
+ else $component = $component->relation($relation);
+ } else {
+ $component = $component->$relation();
+ }
}
return $component->$fieldName;
@@ -2469,10 +2479,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
}
/**
- * @deprecated 3.0 Use DataObject::get and DataList to do your querying
+ * @deprecated 3.0 Use DataList::create and DataList to do your querying
*/
public function buildSQL($filter = "", $sort = "", $limit = "", $join = "", $restrictClasses = true, $having = "") {
- Deprecation::notice('3.0', 'Use DataObject::get and DataList to do your querying instead.');
+ Deprecation::notice('3.0', 'Use DataList::create and DataList to do your querying instead.');
return $this->extendedSQL($filter, $sort, $limit, $join, $having);
}
@@ -2483,10 +2493,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
private static $cache_buildSQL_query;
/**
- * @deprecated 3.0 Use DataObject::get and DataList to do your querying
+ * @deprecated 3.0 Use DataList::create and DataList to do your querying
*/
public function extendedSQL($filter = "", $sort = "", $limit = "", $join = ""){
- Deprecation::notice('3.0', 'Use DataObject::get and DataList to do your querying instead.');
+ Deprecation::notice('3.0', 'Use DataList::create and DataList to do your querying instead.');
$dataList = DataObject::get($this->class, $filter, $sort, $join, $limit);
return $dataList->dataQuery()->query();
}
@@ -2521,10 +2531,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
}
/**
- * @deprecated 3.0 Use DataObject::get and DataList to do your querying
+ * @deprecated 3.0 Use DataList::create and DataList to do your querying
*/
public function Aggregate($class = null) {
- Deprecation::notice('3.0', 'Use DataObject::get and DataList to do your querying instead.');
+ Deprecation::notice('3.0', 'Use DataList::create and DataList to do your querying instead.');
if($class) {
$list = new DataList($class);
@@ -2538,19 +2548,18 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
}
/**
- * @deprecated 3.0 Use DataObject::get and DataList to do your querying
+ * @deprecated 3.0 Use DataList::create and DataList to do your querying
*/
public function RelationshipAggregate($relationship) {
- Deprecation::notice('3.0', 'Use DataObject::get and DataList to do your querying instead.');
+ Deprecation::notice('3.0', 'Use DataList::create and DataList to do your querying instead.');
return $this->$relationship();
}
/**
- * The internal function that actually performs the querying for get().
- * DataObject::get("Table","filter") is the same as singleton("Table")->instance_get("filter")
+ * DataList::create("Table")->where("filter") is the same as singleton("Table")->instance_get("filter")
*
- * @deprecated 3.0 Use DataObject::get and DataList to do your querying
+ * @deprecated 3.0 Use DataList::create and DataList to do your querying
*
* @param string $filter A filter to be inserted into the WHERE clause.
* @param string $sort A sort expression to be inserted into the ORDER BY clause. If omitted, self::$default_sort will be used.
@@ -2561,7 +2570,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* @return mixed The objects matching the filter, in the class specified by $containerClass
*/
public function instance_get($filter = "", $sort = "", $join = "", $limit="", $containerClass = "DataObjectSet") {
- Deprecation::notice('3.0', 'Use DataObject::get and DataList to do your querying instead.');
+ Deprecation::notice('3.0', 'Use DataList::create and DataList to do your querying instead.');
return self::get($this->class, $filter, $sort, $join, $limit, $containerClass);
}
@@ -2655,7 +2664,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* When false will just clear session-local cached data
*
*/
- public function flushCache($persistant=true) {
+ public function flushCache($persistant = true) {
if($persistant) Aggregate::flushCache($this->class);
if($this->class == 'DataObject') {
@@ -2693,7 +2702,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
/**
* Does the hard work for get_one()
*
- * @deprecated 3.0 Use DataObject::get_one() instead
+ * @deprecated 3.0 Use DataList::create($this->class)->where($filter)->sort($orderby)->First() instead
*
* @uses DataExtension->augmentSQL()
*
@@ -2702,7 +2711,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* @return DataObject The first item matching the query
*/
public function instance_get_one($filter, $orderby = null) {
- Deprecation::notice('3.0', 'Use DataObject::get_one() instead.');
+ Deprecation::notice('3.0', 'Use DataList::create($this->class)->where($filter)->sort($orderby)->First() instead.');
return DataObject::get_one($this->class, $filter, true, $orderby);
}
@@ -3343,4 +3352,4 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
}
}
-}
\ No newline at end of file
+}
diff --git a/model/DataQuery.php b/model/DataQuery.php
index 2dad960fd..03d32c9f3 100644
--- a/model/DataQuery.php
+++ b/model/DataQuery.php
@@ -145,7 +145,7 @@ class DataQuery {
if($this->dataClass != $baseClass) {
// Get the ClassName values to filter to
$classNames = ClassInfo::subclassesFor($this->dataClass);
- if(!$classNames) user_error("DataObject::get() Can't find data sub-classes for '$callerClass'");
+ if(!$classNames) user_error("DataList::create() Can't find data sub-classes for '$callerClass'");
$query->where[] = "\"$baseClass\".\"ClassName\" IN ('" . implode("','", $classNames) . "')";
}
}
diff --git a/model/Hierarchy.php b/model/Hierarchy.php
index 20b33e49b..b8e988e3f 100644
--- a/model/Hierarchy.php
+++ b/model/Hierarchy.php
@@ -674,12 +674,12 @@ class Hierarchy extends DataExtension {
self::$expanded = array();
self::$treeOpened = array();
}
-
- function reset() {
+
+ public static function reset() {
self::$marked = array();
self::$expanded = array();
self::$treeOpened = array();
}
+
}
-
diff --git a/model/Image.php b/model/Image.php
index f94ff443c..658bd5898 100644
--- a/model/Image.php
+++ b/model/Image.php
@@ -73,8 +73,8 @@ class Image extends File {
parent::defineMethods();
}
- function getCMSFields() {
- $fields = parent::getCMSFields();
+ function getCMSFields($params = null) {
+ $fields = parent::getCMSFields($params);
$urlLink = "
- * // create a new instance of Services_JSON
- * $json = new Services_JSON();
- *
- * // convert a complexe value to JSON notation, and send it to the browser
- * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
- * $output = $json->encode($value);
- *
- * print($output);
- * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
- *
- * // accept incoming POST data, assumed to be in JSON notation
- * $input = file_get_contents('php://input', 1000000);
- * $value = $json->decode($input);
- *
- */
-class Services_JSON
-{
- /**
- * constructs a new JSON instance
- *
- * @param int $use object behavior flags; combine with boolean-OR
- *
- * possible values:
- * - SERVICES_JSON_LOOSE_TYPE: loose typing.
- * "{...}" syntax creates associative arrays
- * instead of objects in decode().
- * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
- * Values which can't be encoded (e.g. resources)
- * appear as NULL instead of throwing errors.
- * By default, a deeply-nested resource will
- * bubble up with an error, so all return values
- * from encode() should be checked with isError()
- */
- function Services_JSON($use = 0)
- {
- $this->use = $use;
- }
-
- /**
- * convert a string from one UTF-16 char to one UTF-8 char
- *
- * Normally should be handled by mb_convert_encoding, but
- * provides a slower PHP-only method for installations
- * that lack the multibye string extension.
- *
- * @param string $utf16 UTF-16 character
- * @return string UTF-8 character
- * @access private
- */
- function utf162utf8($utf16)
- {
- // oh please oh please oh please oh please oh please
- if(function_exists('mb_convert_encoding')) {
- return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
- }
-
- $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
-
- switch(true) {
- case ((0x7F & $bytes) == $bytes):
- // this case should never be reached, because we are in ASCII range
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- return chr(0x7F & $bytes);
-
- case (0x07FF & $bytes) == $bytes:
- // return a 2-byte UTF-8 character
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- return chr(0xC0 | (($bytes >> 6) & 0x1F))
- . chr(0x80 | ($bytes & 0x3F));
-
- case (0xFFFF & $bytes) == $bytes:
- // return a 3-byte UTF-8 character
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- return chr(0xE0 | (($bytes >> 12) & 0x0F))
- . chr(0x80 | (($bytes >> 6) & 0x3F))
- . chr(0x80 | ($bytes & 0x3F));
- }
-
- // ignoring UTF-32 for now, sorry
- return '';
- }
-
- /**
- * convert a string from one UTF-8 char to one UTF-16 char
- *
- * Normally should be handled by mb_convert_encoding, but
- * provides a slower PHP-only method for installations
- * that lack the multibye string extension.
- *
- * @param string $utf8 UTF-8 character
- * @return string UTF-16 character
- * @access private
- */
- function utf82utf16($utf8)
- {
- // oh please oh please oh please oh please oh please
- if(function_exists('mb_convert_encoding')) {
- return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
- }
-
- switch(strlen($utf8)) {
- case 1:
- // this case should never be reached, because we are in ASCII range
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- return $utf8;
-
- case 2:
- // return a UTF-16 character from a 2-byte UTF-8 char
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- return chr(0x07 & (ord($utf8{0}) >> 2))
- . chr((0xC0 & (ord($utf8{0}) << 6))
- | (0x3F & ord($utf8{1})));
-
- case 3:
- // return a UTF-16 character from a 3-byte UTF-8 char
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- return chr((0xF0 & (ord($utf8{0}) << 4))
- | (0x0F & (ord($utf8{1}) >> 2)))
- . chr((0xC0 & (ord($utf8{1}) << 6))
- | (0x7F & ord($utf8{2})));
- }
-
- // ignoring UTF-32 for now, sorry
- return '';
- }
-
- /**
- * encodes an arbitrary variable into JSON format
- *
- * @param mixed $var any number, boolean, string, array, or object to be encoded.
- * see argument 1 to Services_JSON() above for array-parsing behavior.
- * if var is a strng, note that encode() always expects it
- * to be in ASCII or UTF-8 format!
- *
- * @return mixed JSON string representation of input var or an error if a problem occurs
- * @access public
- */
- function encode($var)
- {
- switch (gettype($var)) {
- case 'boolean':
- return $var ? 'true' : 'false';
-
- case 'NULL':
- return 'null';
-
- case 'integer':
- return (int) $var;
-
- case 'double':
- case 'float':
- return (float) $var;
-
- case 'string':
- // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
- $ascii = '';
- $strlen_var = strlen($var);
-
- /*
- * Iterate over every character in the string,
- * escaping with a slash or encoding to UTF-8 where necessary
- */
- for ($c = 0; $c < $strlen_var; ++$c) {
-
- $ord_var_c = ord($var{$c});
-
- switch (true) {
- case $ord_var_c == 0x08:
- $ascii .= '\b';
- break;
- case $ord_var_c == 0x09:
- $ascii .= '\t';
- break;
- case $ord_var_c == 0x0A:
- $ascii .= '\n';
- break;
- case $ord_var_c == 0x0C:
- $ascii .= '\f';
- break;
- case $ord_var_c == 0x0D:
- $ascii .= '\r';
- break;
-
- case $ord_var_c == 0x22:
- case $ord_var_c == 0x2F:
- case $ord_var_c == 0x5C:
- // double quote, slash, slosh
- $ascii .= '\\'.$var{$c};
- break;
-
- case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
- // characters U-00000000 - U-0000007F (same as ASCII)
- $ascii .= $var{$c};
- break;
-
- case (($ord_var_c & 0xE0) == 0xC0):
- // characters U-00000080 - U-000007FF, mask 110XXXXX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $char = pack('C*', $ord_var_c, ord($var{$c + 1}));
- $c += 1;
- $utf16 = $this->utf82utf16($char);
- $ascii .= sprintf('\u%04s', bin2hex($utf16));
- break;
-
- case (($ord_var_c & 0xF0) == 0xE0):
- // characters U-00000800 - U-0000FFFF, mask 1110XXXX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $char = pack('C*', $ord_var_c,
- ord($var{$c + 1}),
- ord($var{$c + 2}));
- $c += 2;
- $utf16 = $this->utf82utf16($char);
- $ascii .= sprintf('\u%04s', bin2hex($utf16));
- break;
-
- case (($ord_var_c & 0xF8) == 0xF0):
- // characters U-00010000 - U-001FFFFF, mask 11110XXX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $char = pack('C*', $ord_var_c,
- ord($var{$c + 1}),
- ord($var{$c + 2}),
- ord($var{$c + 3}));
- $c += 3;
- $utf16 = $this->utf82utf16($char);
- $ascii .= sprintf('\u%04s', bin2hex($utf16));
- break;
-
- case (($ord_var_c & 0xFC) == 0xF8):
- // characters U-00200000 - U-03FFFFFF, mask 111110XX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $char = pack('C*', $ord_var_c,
- ord($var{$c + 1}),
- ord($var{$c + 2}),
- ord($var{$c + 3}),
- ord($var{$c + 4}));
- $c += 4;
- $utf16 = $this->utf82utf16($char);
- $ascii .= sprintf('\u%04s', bin2hex($utf16));
- break;
-
- case (($ord_var_c & 0xFE) == 0xFC):
- // characters U-04000000 - U-7FFFFFFF, mask 1111110X
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $char = pack('C*', $ord_var_c,
- ord($var{$c + 1}),
- ord($var{$c + 2}),
- ord($var{$c + 3}),
- ord($var{$c + 4}),
- ord($var{$c + 5}));
- $c += 5;
- $utf16 = $this->utf82utf16($char);
- $ascii .= sprintf('\u%04s', bin2hex($utf16));
- break;
- }
- }
-
- return '"'.$ascii.'"';
-
- case 'array':
- /*
- * As per JSON spec if any array key is not an integer
- * we must treat the the whole array as an object. We
- * also try to catch a sparsely populated associative
- * array with numeric keys here because some JS engines
- * will create an array with empty indexes up to
- * max_index which can cause memory issues and because
- * the keys, which may be relevant, will be remapped
- * otherwise.
- *
- * As per the ECMA and JSON specification an object may
- * have any string as a property. Unfortunately due to
- * a hole in the ECMA specification if the key is a
- * ECMA reserved word or starts with a digit the
- * parameter is only accessible using ECMAScript's
- * bracket notation.
- */
-
- // treat as a JSON object
- if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
- $properties = array_map(array($this, 'name_value'),
- array_keys($var),
- array_values($var));
-
- foreach($properties as $property) {
- if(Services_JSON::isError($property)) {
- return $property;
- }
- }
-
- return '{' . join(',', $properties) . '}';
- }
-
- // treat it like a regular array
- $elements = array_map(array($this, 'encode'), $var);
-
- foreach($elements as $element) {
- if(Services_JSON::isError($element)) {
- return $element;
- }
- }
-
- return '[' . join(',', $elements) . ']';
-
- case 'object':
- $vars = get_object_vars($var);
-
- $properties = array_map(array($this, 'name_value'),
- array_keys($vars),
- array_values($vars));
-
- foreach($properties as $property) {
- if(Services_JSON::isError($property)) {
- return $property;
- }
- }
-
- return '{' . join(',', $properties) . '}';
-
- default:
- return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
- ? 'null'
- : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
- }
- }
-
- /**
- * array-walking function for use in generating JSON-formatted name-value pairs
- *
- * @param string $name name of key to use
- * @param mixed $value reference to an array element to be encoded
- *
- * @return string JSON-formatted name-value pair, like '"name":value'
- * @access private
- */
- function name_value($name, $value)
- {
- $encoded_value = $this->encode($value);
-
- if(Services_JSON::isError($encoded_value)) {
- return $encoded_value;
- }
-
- return $this->encode(strval($name)) . ':' . $encoded_value;
- }
-
- /**
- * reduce a string by removing leading and trailing comments and whitespace
- *
- * @param $str string string value to strip of comments and whitespace
- *
- * @return string string value stripped of comments and whitespace
- * @access private
- */
- function reduce_string($str)
- {
- $str = preg_replace(array(
-
- // eliminate single line comments in '// ...' form
- '#^\s*//(.+)$#m',
-
- // eliminate multi-line comments in '/* ... */' form, at start of string
- '#^\s*/\*(.+)\*/#Us',
-
- // eliminate multi-line comments in '/* ... */' form, at end of string
- '#/\*(.+)\*/\s*$#Us'
-
- ), '', $str);
-
- // eliminate extraneous space
- return trim($str);
- }
-
- /**
- * decodes a JSON string into appropriate variable
- *
- * @param string $str JSON-formatted string
- *
- * @return mixed number, boolean, string, array, or object
- * corresponding to given JSON input string.
- * See argument 1 to Services_JSON() above for object-output behavior.
- * Note that decode() always returns strings
- * in ASCII or UTF-8 format!
- * @access public
- */
- function decode($str)
- {
- $str = $this->reduce_string($str);
-
- switch (strtolower($str)) {
- case 'true':
- return true;
-
- case 'false':
- return false;
-
- case 'null':
- return null;
-
- default:
- $m = array();
-
- if (is_numeric($str)) {
- // Lookie-loo, it's a number
-
- // This would work on its own, but I'm trying to be
- // good about returning integers where appropriate:
- // return (float)$str;
-
- // Return float or int, as appropriate
- return ((float)$str == (integer)$str)
- ? (integer)$str
- : (float)$str;
-
- } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {
- // STRINGS RETURNED IN UTF-8 FORMAT
- $delim = substr($str, 0, 1);
- $chrs = substr($str, 1, -1);
- $utf8 = '';
- $strlen_chrs = strlen($chrs);
-
- for ($c = 0; $c < $strlen_chrs; ++$c) {
-
- $substr_chrs_c_2 = substr($chrs, $c, 2);
- $ord_chrs_c = ord($chrs{$c});
-
- switch (true) {
- case $substr_chrs_c_2 == '\b':
- $utf8 .= chr(0x08);
- ++$c;
- break;
- case $substr_chrs_c_2 == '\t':
- $utf8 .= chr(0x09);
- ++$c;
- break;
- case $substr_chrs_c_2 == '\n':
- $utf8 .= chr(0x0A);
- ++$c;
- break;
- case $substr_chrs_c_2 == '\f':
- $utf8 .= chr(0x0C);
- ++$c;
- break;
- case $substr_chrs_c_2 == '\r':
- $utf8 .= chr(0x0D);
- ++$c;
- break;
-
- case $substr_chrs_c_2 == '\\"':
- case $substr_chrs_c_2 == '\\\'':
- case $substr_chrs_c_2 == '\\\\':
- case $substr_chrs_c_2 == '\\/':
- if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
- ($delim == "'" && $substr_chrs_c_2 != '\\"')) {
- $utf8 .= $chrs{++$c};
- }
- break;
-
- case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):
- // single, escaped unicode character
- $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))
- . chr(hexdec(substr($chrs, ($c + 4), 2)));
- $utf8 .= $this->utf162utf8($utf16);
- $c += 5;
- break;
-
- case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
- $utf8 .= $chrs{$c};
- break;
-
- case ($ord_chrs_c & 0xE0) == 0xC0:
- // characters U-00000080 - U-000007FF, mask 110XXXXX
- //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $utf8 .= substr($chrs, $c, 2);
- ++$c;
- break;
-
- case ($ord_chrs_c & 0xF0) == 0xE0:
- // characters U-00000800 - U-0000FFFF, mask 1110XXXX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $utf8 .= substr($chrs, $c, 3);
- $c += 2;
- break;
-
- case ($ord_chrs_c & 0xF8) == 0xF0:
- // characters U-00010000 - U-001FFFFF, mask 11110XXX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $utf8 .= substr($chrs, $c, 4);
- $c += 3;
- break;
-
- case ($ord_chrs_c & 0xFC) == 0xF8:
- // characters U-00200000 - U-03FFFFFF, mask 111110XX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $utf8 .= substr($chrs, $c, 5);
- $c += 4;
- break;
-
- case ($ord_chrs_c & 0xFE) == 0xFC:
- // characters U-04000000 - U-7FFFFFFF, mask 1111110X
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $utf8 .= substr($chrs, $c, 6);
- $c += 5;
- break;
-
- }
-
- }
-
- return $utf8;
-
- } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
- // array, or object notation
-
- if ($str{0} == '[') {
- $stk = array(SERVICES_JSON_IN_ARR);
- $arr = array();
- } else {
- if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
- $stk = array(SERVICES_JSON_IN_OBJ);
- $obj = array();
- } else {
- $stk = array(SERVICES_JSON_IN_OBJ);
- $obj = new stdClass();
- }
- }
-
- array_push($stk, array('what' => SERVICES_JSON_SLICE,
- 'where' => 0,
- 'delim' => false));
-
- $chrs = substr($str, 1, -1);
- $chrs = $this->reduce_string($chrs);
-
- if ($chrs == '') {
- if (reset($stk) == SERVICES_JSON_IN_ARR) {
- return $arr;
-
- } else {
- return $obj;
-
- }
- }
-
- //print("\nparsing {$chrs}\n");
-
- $strlen_chrs = strlen($chrs);
-
- for ($c = 0; $c <= $strlen_chrs; ++$c) {
-
- $top = end($stk);
- $substr_chrs_c_2 = substr($chrs, $c, 2);
-
- if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
- // found a comma that is not inside a string, array, etc.,
- // OR we've reached the end of the character list
- $slice = substr($chrs, $top['where'], ($c - $top['where']));
- array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
- //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
-
- if (reset($stk) == SERVICES_JSON_IN_ARR) {
- // we are in an array, so just push an element onto the stack
- array_push($arr, $this->decode($slice));
-
- } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
- // we are in an object, so figure
- // out the property name and set an
- // element in an associative array,
- // for now
- $parts = array();
-
- if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
- // "name":value pair
- $key = $this->decode($parts[1]);
- $val = $this->decode($parts[2]);
-
- if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
- $obj[$key] = $val;
- } else {
- $obj->$key = $val;
- }
- } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
- // name:value pair, where name is unquoted
- $key = $parts[1];
- $val = $this->decode($parts[2]);
-
- if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
- $obj[$key] = $val;
- } else {
- $obj->$key = $val;
- }
- }
-
- }
-
- } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
- // found a quote, and we are not inside a string
- array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
- //print("Found start of string at {$c}\n");
-
- } elseif (($chrs{$c} == $top['delim']) &&
- ($top['what'] == SERVICES_JSON_IN_STR) &&
- ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
- // found a quote, we're in a string, and it's not escaped
- // we know that it's not escaped becase there is _not_ an
- // odd number of backslashes at the end of the string so far
- array_pop($stk);
- //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
-
- } elseif (($chrs{$c} == '[') &&
- in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
- // found a left-bracket, and we are in an array, object, or slice
- array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
- //print("Found start of array at {$c}\n");
-
- } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
- // found a right-bracket, and we're in an array
- array_pop($stk);
- //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
-
- } elseif (($chrs{$c} == '{') &&
- in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
- // found a left-brace, and we are in an array, object, or slice
- array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
- //print("Found start of object at {$c}\n");
-
- } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
- // found a right-brace, and we're in an object
- array_pop($stk);
- //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
-
- } elseif (($substr_chrs_c_2 == '/*') &&
- in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
- // found a comment start, and we are in an array, object, or slice
- array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
- $c++;
- //print("Found start of comment at {$c}\n");
-
- } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
- // found a comment end, and we're in one now
- array_pop($stk);
- $c++;
-
- for ($i = $top['where']; $i <= $c; ++$i)
- $chrs = substr_replace($chrs, ' ', $i, 1);
-
- //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
-
- }
-
- }
-
- if (reset($stk) == SERVICES_JSON_IN_ARR) {
- return $arr;
-
- } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
- return $obj;
-
- }
-
- }
- }
- }
-
- /**
- * @todo Ultimately, this should just call PEAR::isError()
- */
- function isError($data, $code = null)
- {
- if (class_exists('pear')) {
- return PEAR::isError($data, $code);
- } elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
- is_subclass_of($data, 'services_json_error'))) {
- return true;
- }
-
- return false;
- }
-}
-
-if (class_exists('PEAR_Error')) {
-
- class Services_JSON_Error extends PEAR_Error
- {
- function Services_JSON_Error($message = 'unknown error', $code = null,
- $mode = null, $options = null, $userinfo = null)
- {
- parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
- }
- }
-
-} else {
-
- /**
- * @todo Ultimately, this class shall be descended from PEAR_Error
- */
- class Services_JSON_Error
- {
- function Services_JSON_Error($message = 'unknown error', $code = null,
- $mode = null, $options = null, $userinfo = null)
- {
-
- }
- }
-
-}
-
-?>
diff --git a/thirdparty/json/LICENSE b/thirdparty/json/LICENSE
deleted file mode 100644
index 4ae6bef55..000000000
--- a/thirdparty/json/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
-NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/thirdparty/json/Test-JSON.php b/thirdparty/json/Test-JSON.php
deleted file mode 100644
index 4a437f743..000000000
--- a/thirdparty/json/Test-JSON.php
+++ /dev/null
@@ -1,521 +0,0 @@
-
- * @author Matt Knapp