MINOR Updated jQuery.concrete references to point to the new "entwine" name

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102697 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-13 05:55:56 +00:00
parent c2bd020ff6
commit 168589a59f
22 changed files with 98 additions and 98 deletions

View File

@ -218,7 +218,7 @@ JS
echo <<<HTML echo <<<HTML
<script type="text/javascript"> <script type="text/javascript">
var url = parent.document.getElementById('sitetree').getTreeNodeByIdx( "{$folder->ID}" ).getElementsByTagName('a')[0].href; var url = parent.document.getElementById('sitetree').getTreeNodeByIdx( "{$folder->ID}" ).getElementsByTagName('a')[0].href;
parent.jQuery('#Form_EditForm').concrete('ss').loadForm(url); parent.jQuery('#Form_EditForm').entwine('ss').loadForm(url);
parent.statusMessage("{$statusMessage}","{$status}"); parent.statusMessage("{$statusMessage}","{$status}");
</script> </script>
HTML; HTML;

View File

@ -221,8 +221,8 @@ class LeftAndMain extends Controller {
// @todo Load separately so the CSS files can be inlined // @todo Load separately so the CSS files can be inlined
Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/ui.all.css'); Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/ui.all.css');
// concrete // entwine
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/dist/jquery.concrete-dist.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
// Required for TreeTools panel above tree // Required for TreeTools panel above tree
Requirements::javascript(SAPPHIRE_DIR . '/javascript/TabSet.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/TabSet.js');
@ -737,7 +737,7 @@ JS;
* Also used in the template rendered through {@link Right()} in the $EditForm placeholder. * Also used in the template rendered through {@link Right()} in the $EditForm placeholder.
* *
* This is a "pseudo-abstract" methoed, usually connected to a {@link getEditForm()} * This is a "pseudo-abstract" methoed, usually connected to a {@link getEditForm()}
* method in a concrete subclass. This method can accept a record identifier, * method in an entwine subclass. This method can accept a record identifier,
* selected either in custom logic, or through {@link currentPageID()}. * selected either in custom logic, or through {@link currentPageID()}.
* The form usually construct itself from {@link DataObject->getCMSFields()} * The form usually construct itself from {@link DataObject->getCMSFields()}
* for the specific managed subclass defined in {@link LeftAndMain::$tree_class}. * for the specific managed subclass defined in {@link LeftAndMain::$tree_class}.

View File

@ -138,7 +138,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
Requirements::css(CMS_DIR . '/css/typography.css'); Requirements::css(CMS_DIR . '/css/typography.css');
Requirements::css(CMS_DIR . '/css/cms_right.css'); Requirements::css(CMS_DIR . '/css/cms_right.css');
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/dist/jquery.concrete-dist.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
Requirements::css(CMS_DIR . '/css/MemberImportForm.css'); Requirements::css(CMS_DIR . '/css/MemberImportForm.css');
Requirements::javascript(CMS_DIR . '/javascript/MemberImportForm.js'); Requirements::javascript(CMS_DIR . '/javascript/MemberImportForm.js');
@ -169,7 +169,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
Requirements::css(CMS_DIR . '/css/typography.css'); Requirements::css(CMS_DIR . '/css/typography.css');
Requirements::css(CMS_DIR . '/css/cms_right.css'); Requirements::css(CMS_DIR . '/css/cms_right.css');
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/dist/jquery.concrete-dist.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
Requirements::css(CMS_DIR . '/css/MemberImportForm.css'); Requirements::css(CMS_DIR . '/css/MemberImportForm.css');
Requirements::javascript(CMS_DIR . '/javascript/MemberImportForm.js'); Requirements::javascript(CMS_DIR . '/javascript/MemberImportForm.js');

View File

@ -1,7 +1,7 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
$('.AssetTableField.dragdrop').concrete({ $('.AssetTableField.dragdrop').entwine({
onmatch: function() { onmatch: function() {
var self = this; var self = this;
$('#sitetree li').each(function() { $('#sitetree li').each(function() {
@ -43,7 +43,7 @@
} }
}); });
$('.AssetTableField .dragfile').concrete({ $('.AssetTableField .dragfile').entwine({
onmatch: function() { onmatch: function() {
var self = this; var self = this;
var container = this.parents('.AssetTableField'); var container = this.parents('.AssetTableField');

View File

@ -20,7 +20,7 @@ var _HANDLER_FORMS = {
* Delete selected folders through "batch actions" tab. * Delete selected folders through "batch actions" tab.
*/ */
$(document).ready(function() { $(document).ready(function() {
$('#Form_BatchActionsForm').concrete('ss').register( $('#Form_BatchActionsForm').entwine('ss').register(
// TODO Hardcoding of base URL // TODO Hardcoding of base URL
'admin/assets/batchactions/delete', 'admin/assets/batchactions/delete',
function(ids) { function(ids) {
@ -35,8 +35,8 @@ var _HANDLER_FORMS = {
); );
}); });
$.concrete('ss', function($){ $.entwine('ss', function($){
$('#Form_SyncForm').concrete({ $('#Form_SyncForm').entwine({
onsubmit: function(e) { onsubmit: function(e) {
var button = jQuery(this).find(':submit:first'); var button = jQuery(this).find(':submit:first');
button.addClass('loading'); button.addClass('loading');

View File

@ -1,7 +1,7 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
$('.AssetTableField').concrete({ $('.AssetTableField').entwine({
onmatch: function() { onmatch: function() {
var self = this; var self = this;
@ -46,7 +46,7 @@
/** /**
* Checkboxes used to batch delete files * Checkboxes used to batch delete files
*/ */
$('.AssetTableField :checkbox').concrete({ $('.AssetTableField :checkbox').entwine({
onchange: function() { onchange: function() {
var container = this.parents('.AssetTableField'); var container = this.parents('.AssetTableField');
var input = container.find('input#deletemarked'); var input = container.find('input#deletemarked');
@ -62,7 +62,7 @@
* Batch delete files marked by checkboxes in the table. * Batch delete files marked by checkboxes in the table.
* Refreshes the form field afterwards via ajax. * Refreshes the form field afterwards via ajax.
*/ */
$('.AssetTableField input#deletemarked').concrete({ $('.AssetTableField input#deletemarked').entwine({
onmatch: function() { onmatch: function() {
this.attr('disabled', 'disabled'); this.attr('disabled', 'disabled');
this._super(); this._super();

View File

@ -1,11 +1,11 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
/** /**
* Alert the user on change of page-type - this might have implications * Alert the user on change of page-type - this might have implications
* on the available form fields etc. * on the available form fields etc.
* @name ss.EditFormClassName * @name ss.EditFormClassName
*/ */
$('#Form_EditForm :input[name=ClassName]').concrete(/** @lends ss.EditFormClassName */{ $('#Form_EditForm :input[name=ClassName]').entwine(/** @lends ss.EditFormClassName */{
onchange: function() { onchange: function() {
alert(ss.i18n._t('CMSMAIN.ALERTCLASSNAME')); alert(ss.i18n._t('CMSMAIN.ALERTCLASSNAME'));
} }
@ -15,7 +15,7 @@
* @class Input validation on the URLSegment field * @class Input validation on the URLSegment field
* @name ss.EditForm.URLSegment * @name ss.EditForm.URLSegment
*/ */
$('#Form_EditForm input[name=URLSegment]').concrete(/** @lends ss.EditForm.URLSegment */{ $('#Form_EditForm input[name=URLSegment]').entwine(/** @lends ss.EditForm.URLSegment */{
FilterRegex: /[^A-Za-z0-9-]+/, FilterRegex: /[^A-Za-z0-9-]+/,
ValidationMessage: ss.i18n._t('CMSMAIN.URLSEGMENTVALIDATION'), ValidationMessage: ss.i18n._t('CMSMAIN.URLSEGMENTVALIDATION'),
MaxLength: 50, MaxLength: 50,
@ -58,7 +58,7 @@
* @class Input validation on the Title field * @class Input validation on the Title field
* @name ss.EditForm.Title * @name ss.EditForm.Title
*/ */
$('#Form_EditForm input[name=Title]').concrete(/** @lends ss.EditForm.Title */{ $('#Form_EditForm input[name=Title]').entwine(/** @lends ss.EditForm.Title */{
onmatch : function() { onmatch : function() {
var self = this; var self = this;
@ -76,7 +76,7 @@
// TODO language/logic coupling // TODO language/logic coupling
var isNew = this.val().indexOf("new") == 0; var isNew = this.val().indexOf("new") == 0;
var suggestion = field.concrete('ss').suggestValue(this.val()); var suggestion = field.entwine('ss').suggestValue(this.val());
var confirmMessage = ss.i18n.sprintf( var confirmMessage = ss.i18n.sprintf(
ss.i18n._t( ss.i18n._t(
'UPDATEURL.CONFIRM', 'UPDATEURL.CONFIRM',
@ -100,7 +100,7 @@
* the two radiobuttons and setting the hidden "ParentID" field * the two radiobuttons and setting the hidden "ParentID" field
* @name ss.EditForm.parentTypeSelector * @name ss.EditForm.parentTypeSelector
*/ */
$('#Form_EditForm .parentTypeSelector').concrete(/** @lends ss.EditForm.parentTypeSelector */{ $('#Form_EditForm .parentTypeSelector').entwine(/** @lends ss.EditForm.parentTypeSelector */{
onmatch : function() { onmatch : function() {
var self = this; var self = this;
this.find(':input[name=ParentType]').bind('click', function(e) {self._toggleSelection(e);}); this.find(':input[name=ParentType]').bind('click', function(e) {self._toggleSelection(e);});
@ -123,7 +123,7 @@
* based on selection of radiobuttons. * based on selection of radiobuttons.
* @name ss.Form_EditForm.Access * @name ss.Form_EditForm.Access
*/ */
$('#Form_EditForm #CanViewType, #Form_EditForm #CanEditType').concrete(/** @lends ss.Form_EditForm.Access */{ $('#Form_EditForm #CanViewType, #Form_EditForm #CanEditType').entwine(/** @lends ss.Form_EditForm.Access */{
onmatch: function() { onmatch: function() {
// TODO Decouple // TODO Decouple
var dropdown; var dropdown;
@ -147,7 +147,7 @@
* Visible on readonly older versions of a specific page at the moment. * Visible on readonly older versions of a specific page at the moment.
* @name ss.Form_EditForm_action_email * @name ss.Form_EditForm_action_email
*/ */
$('#Form_EditForm .Actions #Form_EditForm_action_email').concrete(/** @lends ss.Form_EditForm_action_email */{ $('#Form_EditForm .Actions #Form_EditForm_action_email').entwine(/** @lends ss.Form_EditForm_action_email */{
onclick: function(e) { onclick: function(e) {
window.open( window.open(
'mailto:?subject=' 'mailto:?subject='
@ -166,7 +166,7 @@
* Used for readonly older versions of a specific page. * Used for readonly older versions of a specific page.
* @name ss.Form_EditForm_action_print * @name ss.Form_EditForm_action_print
*/ */
$('#Form_EditForm .Actions #Form_EditForm_action_print').concrete(/** @lends ss.Form_EditForm_action_print */{ $('#Form_EditForm .Actions #Form_EditForm_action_print').entwine(/** @lends ss.Form_EditForm_action_print */{
onclick: function(e) { onclick: function(e) {
var printURL = $(this[0].form).attr('action').replace(/\?.*$/,'') var printURL = $(this[0].form).attr('action').replace(/\?.*$/,'')
+ '/printable/' + '/printable/'
@ -183,7 +183,7 @@
* @class A "rollback" to a specific version needs user confirmation. * @class A "rollback" to a specific version needs user confirmation.
* @name ss.Form_EditForm_action_rollback * @name ss.Form_EditForm_action_rollback
*/ */
$('#Form_EditForm .Actions #Form_EditForm_action_rollback').concrete(/** @lends ss.Form_EditForm_action_rollback */{ $('#Form_EditForm .Actions #Form_EditForm_action_rollback').entwine(/** @lends ss.Form_EditForm_action_rollback */{
onclick: function(e) { onclick: function(e) {
// @todo i18n // @todo i18n
var form = this.parents('form:first'), version = form.find(':input[name=Version]').val(), message = ''; var form = this.parents('form:first'), version = form.find(':input[name=Version]').val(), message = '';

View File

@ -1,11 +1,11 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
/** /**
* @class Dropdown with languages above CMS tree, causing a redirect upon translation * @class Dropdown with languages above CMS tree, causing a redirect upon translation
* @name ss.CMSMain.LangSelector * @name ss.CMSMain.LangSelector
*/ */
$('.CMSMain #Form_LangForm').concrete(/** @lends ss.CMSMain.LangSelector */{ $('.CMSMain #Form_LangForm').entwine(/** @lends ss.CMSMain.LangSelector */{
onmatch: function() { onmatch: function() {
var self = this; var self = this;
@ -38,7 +38,7 @@
* @name ss.CMSMain.createtranslation * @name ss.CMSMain.createtranslation
* @requires jquery.metadata * @requires jquery.metadata
*/ */
$('.CMSMain .createTranslation').concrete(/** @lends ss.CMSMain.createtranslation */{ $('.CMSMain .createTranslation').entwine(/** @lends ss.CMSMain.createtranslation */{
onmatch: function() { onmatch: function() {
var self = this; var self = this;

View File

@ -13,11 +13,11 @@ TreeContextMenu = {
}, },
'Duplicate page and children' : function(treeNode) { 'Duplicate page and children' : function(treeNode) {
// First save the page silently (without confirmation) and then duplicate the page. // First save the page silently (without confirmation) and then duplicate the page.
jQuery('#Form_EditForm').concrete('ss').ajaxSubmit(null, treeNode.duplicatePageWithChildren.bind(treeNode)); jQuery('#Form_EditForm').entwine('ss').ajaxSubmit(null, treeNode.duplicatePageWithChildren.bind(treeNode));
}, },
'Duplicate just this page' : function(treeNode) { 'Duplicate just this page' : function(treeNode) {
// First save the page silently (without confirmation) and then duplicate the page. // First save the page silently (without confirmation) and then duplicate the page.
jQuery('#Form_EditForm').concrete('ss').ajaxSubmit(null, treeNode.duplicatePageWithChildren.bind(treeNode)); jQuery('#Form_EditForm').entwine('ss').ajaxSubmit(null, treeNode.duplicatePageWithChildren.bind(treeNode));
}, },
'Sort sub-pages' : function(treeNode) { 'Sort sub-pages' : function(treeNode) {
var children = treeNode.treeNodeHolder().childTreeNodes(); var children = treeNode.treeNodeHolder().childTreeNodes();

View File

@ -1,11 +1,11 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
/** /**
* @class All forms in the right content panel should have closeable jQuery UI style titles. * @class All forms in the right content panel should have closeable jQuery UI style titles.
* @name ss.contentPanel.form * @name ss.contentPanel.form
*/ */
$('#contentPanel form').concrete(/** @lends ss.contentPanel.form */{ $('#contentPanel form').entwine(/** @lends ss.contentPanel.form */{
onmatch: function() { onmatch: function() {
// Style as title bar // Style as title bar
this.find(':header:first').titlebar({ this.find(':header:first').titlebar({
@ -13,7 +13,7 @@
}); });
// The close button should close the east panel of the layout // The close button should close the east panel of the layout
this.find(':header:first .ui-dialog-titlebar-close').bind('click', function(e) { this.find(':header:first .ui-dialog-titlebar-close').bind('click', function(e) {
$('body.CMSMain').concrete('ss').getMainLayout().close('east'); $('body.CMSMain').entwine('ss').getMainLayout().close('east');
return false; return false;
}); });
@ -27,7 +27,7 @@
* similar to "Smart Search" criteria in iTunes. * similar to "Smart Search" criteria in iTunes.
* @name ss.Form_SeachTreeForm * @name ss.Form_SeachTreeForm
*/ */
$('#Form_SearchTreeForm').concrete(/** @lends ss.Form_SeachTreeForm */{ $('#Form_SearchTreeForm').entwine(/** @lends ss.Form_SeachTreeForm */{
/** /**
* @type DOMElement * @type DOMElement
*/ */
@ -164,7 +164,7 @@
* which creates a new page through #Form_EditForm and adds a new tree node. * which creates a new page through #Form_EditForm and adds a new tree node.
* @name ss.reports_holder * @name ss.reports_holder
*/ */
$('#Form_SideReportsForm').concrete(/** @lends ss.reports_holder */{ $('#Form_SideReportsForm').entwine(/** @lends ss.reports_holder */{
ReportContainer: null, ReportContainer: null,
onmatch: function() { onmatch: function() {
@ -215,7 +215,7 @@
/** /**
* All forms loaded via ajax from the Form_SideReports dropdown. * All forms loaded via ajax from the Form_SideReports dropdown.
*/ */
$("#SideReportsHolder form").concrete({ $("#SideReportsHolder form").entwine({
onsubmit: function() { onsubmit: function() {
var self = this; var self = this;
@ -243,12 +243,12 @@
/** /**
* Register the onclick handler that loads the page into EditForm * Register the onclick handler that loads the page into EditForm
*/ */
$("#SideReportsHolder form ul a").concrete({ $("#SideReportsHolder form ul a").entwine({
onclick: function(e) { onclick: function(e) {
if (e.button!=2) { if (e.button!=2) {
var $link = $(this); var $link = $(this);
$link.addClass('loading'); $link.addClass('loading');
jQuery('#Form_EditForm').concrete('ss').loadForm( jQuery('#Form_EditForm').entwine('ss').loadForm(
$(this).attr('href'), $(this).attr('href'),
function(e) { function(e) {
$link.removeClass('loading'); $link.removeClass('loading');
@ -265,7 +265,7 @@
* @name ss.Form_VersionsForm * @name ss.Form_VersionsForm
* @requires ss.i18n * @requires ss.i18n
*/ */
$('#Form_VersionsForm').concrete(/** @lends ss.Form_VersionsForm */{ $('#Form_VersionsForm').entwine(/** @lends ss.Form_VersionsForm */{
onmatch: function() { onmatch: function() {
var self = this; var self = this;
@ -309,7 +309,7 @@
var link = $(this).siblings('.versionlink').find('a').attr('href'); var link = $(this).siblings('.versionlink').find('a').attr('href');
td.addClass('loading'); td.addClass('loading');
jQuery('#Form_EditForm').concrete('ss').loadForm( jQuery('#Form_EditForm').entwine('ss').loadForm(
link, link,
function(e) { function(e) {
td.removeClass('loading'); td.removeClass('loading');
@ -357,7 +357,7 @@
data.push({name:$button.attr('name'), value: $button.val()}); data.push({name:$button.attr('name'), value: $button.val()});
if(loadEditForm) { if(loadEditForm) {
jQuery('#Form_EditForm').concrete('ss').loadForm( jQuery('#Form_EditForm').entwine('ss').loadForm(
this.attr('action'), this.attr('action'),
function(e) { function(e) {
$button.removeClass('loading'); $button.removeClass('loading');

View File

@ -1,5 +1,5 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
/** /**
* @class Simple form with a page type dropdown * @class Simple form with a page type dropdown
* which creates a new page through #Form_EditForm and adds a new tree node. * which creates a new page through #Form_EditForm and adds a new tree node.
@ -7,7 +7,7 @@
* @requires ss.i18n * @requires ss.i18n
* @requires ss.Form_EditForm * @requires ss.Form_EditForm
*/ */
$('#Form_AddForm').concrete(/** @lends ss.Form_AddForm */{ $('#Form_AddForm').entwine(/** @lends ss.Form_AddForm */{
/** /**
* @type DOMElement * @type DOMElement
*/ */
@ -58,7 +58,7 @@
data.push({name:'Suffix',value:newPages[parentID]++}); data.push({name:'Suffix',value:newPages[parentID]++});
data.push({name:button.attr('name'),value:button.val()}); data.push({name:button.attr('name'),value:button.val()});
// TODO Should be set by hiddenfield already // TODO Should be set by hiddenfield already
jQuery('#Form_EditForm').concrete('ss').loadForm( jQuery('#Form_EditForm').entwine('ss').loadForm(
jQuery(this).attr('action'), jQuery(this).attr('action'),
function() { function() {
button.removeClass('loading'); button.removeClass('loading');

View File

@ -1,5 +1,5 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
/** /**
* @class Batch actions which take a bunch of selected pages, * @class Batch actions which take a bunch of selected pages,
@ -12,7 +12,7 @@
* - register: Called before an action is added. * - register: Called before an action is added.
* - unregister: Called before an action is removed. * - unregister: Called before an action is removed.
*/ */
$('#Form_BatchActionsForm').concrete(/** @lends ss.Form_BatchActionsForm */{ $('#Form_BatchActionsForm').entwine(/** @lends ss.Form_BatchActionsForm */{
/** /**
* @type {DOMElement} * @type {DOMElement}
@ -156,10 +156,10 @@
// only if the current page was modified // only if the current page was modified
selectedNode.selectTreeNode(); selectedNode.selectTreeNode();
} else if(data.deleted[selectedNode.getIdx()]) { } else if(data.deleted[selectedNode.getIdx()]) {
jQuery('#Form_EditForm').concrete('ss').removeForm(); jQuery('#Form_EditForm').entwine('ss').removeForm();
} }
} else { } else {
jQuery('#Form_EditForm').concrete('ss').removeForm(); jQuery('#Form_EditForm').entwine('ss').removeForm();
} }
// close panel // close panel
@ -229,7 +229,7 @@
/** /**
* Publish selected pages action * Publish selected pages action
*/ */
$('#Form_BatchActionsForm').concrete('ss').register('admin/batchactions/publish', function(ids) { $('#Form_BatchActionsForm').entwine('ss').register('admin/batchactions/publish', function(ids) {
var confirmed = confirm( var confirmed = confirm(
"You have " + ids.length + " pages selected.\n\n" "You have " + ids.length + " pages selected.\n\n"
+ "Do your really want to publish?" + "Do your really want to publish?"
@ -240,7 +240,7 @@
/** /**
* Unpublish selected pages action * Unpublish selected pages action
*/ */
$('#Form_BatchActionsForm').concrete('ss').register('admin/batchactions/unpublish', function(ids) { $('#Form_BatchActionsForm').entwine('ss').register('admin/batchactions/unpublish', function(ids) {
var confirmed = confirm( var confirmed = confirm(
"You have " + ids.length + " pages selected.\n\n" "You have " + ids.length + " pages selected.\n\n"
+ "Do your really want to unpublish?" + "Do your really want to unpublish?"
@ -251,7 +251,7 @@
/** /**
* Delete selected pages action * Delete selected pages action
*/ */
$('#Form_BatchActionsForm').concrete('ss').register('admin/batchactions/delete', function(ids) { $('#Form_BatchActionsForm').entwine('ss').register('admin/batchactions/delete', function(ids) {
var confirmed = confirm( var confirmed = confirm(
"You have " + ids.length + " pages selected.\n\n" "You have " + ids.length + " pages selected.\n\n"
+ "Do your really want to delete?" + "Do your really want to delete?"
@ -262,7 +262,7 @@
/** /**
* Delete selected pages from live action * Delete selected pages from live action
*/ */
$('#Form_BatchActionsForm').concrete('ss').register('admin/batchactions/deletefromlive', function(ids) { $('#Form_BatchActionsForm').entwine('ss').register('admin/batchactions/deletefromlive', function(ids) {
var confirmed = confirm( var confirmed = confirm(
"You have " + ids.length + " pages selected.\n\n" "You have " + ids.length + " pages selected.\n\n"
+ "Do your really want to delete these pages from live?" + "Do your really want to delete these pages from live?"

View File

@ -1,5 +1,5 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
/** /**
* @class Base edit form, provides ajaxified saving * @class Base edit form, provides ajaxified saving
@ -14,7 +14,7 @@
* - removeform: A form is about to be removed from the DOM * - removeform: A form is about to be removed from the DOM
* - load: Form is about to be loaded through ajax * - load: Form is about to be loaded through ajax
*/ */
$('#Form_EditForm').concrete(/** @lends ss.Form_EditForm */{ $('#Form_EditForm').entwine(/** @lends ss.Form_EditForm */{
/** /**
* @type String HTML text to show when no form content is chosen. * @type String HTML text to show when no form content is chosen.
* Will show inside the <form> tag. * Will show inside the <form> tag.
@ -255,7 +255,7 @@
this.removeForm(); this.removeForm();
} }
// @todo Coupling to avoid FOUC (concrete applies to late) // @todo Coupling to avoid FOUC (entwine applies to late)
this.find('.ss-tabset').tabs(); this.find('.ss-tabset').tabs();
this._setupChangeTracker(); this._setupChangeTracker();
@ -292,9 +292,9 @@
* clicked button from a form.onsubmit event. * clicked button from a form.onsubmit event.
* @name ss.Form_EditForm.Actions.submit * @name ss.Form_EditForm.Actions.submit
*/ */
$('#Form_EditForm .Actions :submit').concrete(/** @lends ss.Form_EditForm.Actions.submit */{ $('#Form_EditForm .Actions :submit').entwine(/** @lends ss.Form_EditForm.Actions.submit */{
onclick: function(e) { onclick: function(e) {
jQuery('#Form_EditForm').concrete('ss').ajaxSubmit(this); jQuery('#Form_EditForm').entwine('ss').ajaxSubmit(this);
return false; return false;
} }
}); });
@ -303,7 +303,7 @@
* @class Add tinymce to HtmlEditorFields within the CMS. * @class Add tinymce to HtmlEditorFields within the CMS.
* @name ss.Form_EditForm.textarea.htmleditor * @name ss.Form_EditForm.textarea.htmleditor
*/ */
$('#Form_EditForm textarea.htmleditor').concrete(/** @lends ss.Form_EditForm.Actions.submit */{ $('#Form_EditForm textarea.htmleditor').entwine(/** @lends ss.Form_EditForm.Actions.submit */{
onmatch : function() { onmatch : function() {
tinyMCE.execCommand("mceAddControl", true, this.attr('id')); tinyMCE.execCommand("mceAddControl", true, this.attr('id'));
this.isChanged = function() { this.isChanged = function() {

View File

@ -217,13 +217,13 @@ TreeNodeAPI.prototype = {
this.getPageFromServer(); this.getPageFromServer();
} }
} else { } else {
jQuery('#Form_EditForm').concrete('ss').removeForm(); jQuery('#Form_EditForm').entwine('ss').removeForm();
} }
}, },
getPageFromServer : function() { getPageFromServer : function() {
var self = this; var self = this;
var xmlhttp = jQuery('#Form_EditForm').concrete('ss').loadForm( var xmlhttp = jQuery('#Form_EditForm').entwine('ss').loadForm(
jQuery(this).find('a').attr('href'), jQuery(this).find('a').attr('href'),
function(response) { function(response) {
self.removeNodeClass('loading'); self.removeNodeClass('loading');

View File

@ -5,10 +5,10 @@
var ss_MainLayout; var ss_MainLayout;
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
// setup jquery.concrete // setup jquery.entwine
$.concrete.warningLevel = $.concrete.WARN_LEVEL_BESTPRACTISE; $.entwine.warningLevel = $.entwine.WARN_LEVEL_BESTPRACTISE;
// global ajax error handlers // global ajax error handlers
$.ajaxSetup({ $.ajaxSetup({
@ -29,7 +29,7 @@ var ss_MainLayout;
* panel and an edit form. * panel and an edit form.
* @name ss.LeftAndMain * @name ss.LeftAndMain
*/ */
$('.LeftAndMain').concrete(/** @lends ss.EditMemberProfile */{ $('.LeftAndMain').entwine(/** @lends ss.EditMemberProfile */{
/** /**
* Reference to jQuery.layout element * Reference to jQuery.layout element
* @type Object * @type Object
@ -205,7 +205,7 @@ var ss_MainLayout;
* *
* @name ss.LeftAndMain.Buttons * @name ss.LeftAndMain.Buttons
*/ */
$('.LeftAndMain :submit, .LeftAndMain button, .LeftAndMain :reset').concrete(/** @lends ss.LeftAndMain.Buttons */{ $('.LeftAndMain :submit, .LeftAndMain button, .LeftAndMain :reset').entwine(/** @lends ss.LeftAndMain.Buttons */{
onmatch: function() { onmatch: function() {
this.addClass( this.addClass(
'ui-state-default ' + 'ui-state-default ' +
@ -242,7 +242,7 @@ var ss_MainLayout;
* @class Container for tree actions like "create", "search", etc. * @class Container for tree actions like "create", "search", etc.
* @name ss.TreeActions * @name ss.TreeActions
*/ */
$('#TreeActions').concrete(/** @lends ss.TreeActions */{ $('#TreeActions').entwine(/** @lends ss.TreeActions */{
/** /**
* Setup "create", "search", "batch actions" layers above tree. * Setup "create", "search", "batch actions" layers above tree.
* All tab contents are closed by default. * All tab contents are closed by default.
@ -261,7 +261,7 @@ var ss_MainLayout;
* through a modal dialog. * through a modal dialog.
* @name ss.EditMemberProfile * @name ss.EditMemberProfile
*/ */
$('a#EditMemberProfile').concrete(/** @lends ss.EditMemberProfile */{ $('a#EditMemberProfile').entwine(/** @lends ss.EditMemberProfile */{
onmatch: function() { onmatch: function() {
var self = this; var self = this;
@ -351,7 +351,7 @@ var ss_MainLayout;
* @name ss.switchViewLinks * @name ss.switchViewLinks
* @requires jquery.metadata * @requires jquery.metadata
*/ */
$('#switchView a').concrete(/** @lends ss.switchViewLinks */{ $('#switchView a').entwine(/** @lends ss.switchViewLinks */{
/** /**
* @type DOMElement * @type DOMElement
*/ */

View File

@ -1,6 +1,6 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
$('.import-form .advanced').concrete({ $('.import-form .advanced').entwine({
onmatch: function() { onmatch: function() {
this._super(); this._super();
@ -8,7 +8,7 @@
} }
}); });
$('.import-form a.toggle-advanced').concrete({ $('.import-form a.toggle-advanced').entwine({
onclick: function(e) { onclick: function(e) {
this.parents('form:eq(0)').find('.advanced').toggle(); this.parents('form:eq(0)').find('.advanced').toggle();
return false; return false;

View File

@ -1,11 +1,11 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
/** /**
* Automatically check and disable all checkboxes if ADMIN permissions are selected. * Automatically check and disable all checkboxes if ADMIN permissions are selected.
* As they're disabled, any changes won't be submitted (which is intended behaviour), * As they're disabled, any changes won't be submitted (which is intended behaviour),
* checking all boxes is purely presentational. * checking all boxes is purely presentational.
*/ */
$('#Permissions .checkbox[value=ADMIN]').concrete({ $('#Permissions .checkbox[value=ADMIN]').entwine({
onmatch: function() { onmatch: function() {
this.toggleCheckboxes(); this.toggleCheckboxes();

View File

@ -1,5 +1,5 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
/** /**
* A simple ajax browser history implementation tailored towards * A simple ajax browser history implementation tailored towards
* navigating through search results and different forms loaded into * navigating through search results and different forms loaded into
@ -20,7 +20,7 @@
* *
* @name ss.ModelAdmin * @name ss.ModelAdmin
*/ */
$('.ModelAdmin').concrete(/** @lends ss.ModelAdmin */ { $('.ModelAdmin').entwine(/** @lends ss.ModelAdmin */ {
History: [], History: [],
Future: [], Future: [],
@ -118,7 +118,7 @@
/** /**
* A search action will cause the history to be reset. * A search action will cause the history to be reset.
*/ */
$('#SearchForm_holder form').concrete({ $('#SearchForm_holder form').entwine({
onmatch: function() { onmatch: function() {
var self = this; var self = this;
this.bind('beforeSubmit', function(e) { this.bind('beforeSubmit', function(e) {
@ -136,7 +136,7 @@
* We have to apply this to the result table buttons instead of the * We have to apply this to the result table buttons instead of the
* more generic form loading. * more generic form loading.
*/ */
$('form[name=Form_ResultsForm] tbody td a').concrete({ $('form[name=Form_ResultsForm] tbody td a').entwine({
onclick: function(e) { onclick: function(e) {
$('.ModelAdmin').addHistory(this.attr('href')); $('.ModelAdmin').addHistory(this.attr('href'));
} }

View File

@ -9,7 +9,7 @@
* @todo alias the $ function instead of literal jQuery * @todo alias the $ function instead of literal jQuery
*/ */
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
// Search form // Search form
@ -18,7 +18,7 @@
/** /**
* If a dropdown is used to choose between the classes, it is handled by this code * If a dropdown is used to choose between the classes, it is handled by this code
*/ */
$('#ModelClassSelector select').concrete({ $('#ModelClassSelector select').entwine({
onmatch: function() { onmatch: function() {
// Initialise the form by calling this onchange event straight away // Initialise the form by calling this onchange event straight away
this.change(); this.change();
@ -44,7 +44,7 @@
* *
* Note: This is used for Form_CreateForm and all Form_SearchForm_* variations * Note: This is used for Form_CreateForm and all Form_SearchForm_* variations
*/ */
$('#SearchForm_holder form').concrete({ $('#SearchForm_holder form').entwine({
onsubmit: function(e) { onsubmit: function(e) {
// Import forms are processed without ajax // Import forms are processed without ajax
if(this.is('#Form_ImportForm')) return true; if(this.is('#Form_ImportForm')) return true;
@ -69,7 +69,7 @@
/** /**
* Column selection in search form * Column selection in search form
*/ */
$('a.form_frontend_function.toggle_result_assembly').concrete({ $('a.form_frontend_function.toggle_result_assembly').entwine({
onclick: function(e) { onclick: function(e) {
var toggleElement = $(this).next(); var toggleElement = $(this).next();
toggleElement.toggle(); toggleElement.toggle();
@ -77,7 +77,7 @@
} }
}); });
$('a.form_frontend_function.tick_all_result_assembly').concrete({ $('a.form_frontend_function.tick_all_result_assembly').entwine({
onclick: function(e) { onclick: function(e) {
var resultAssembly = $(this).prevAll('div#ResultAssembly').find('ul li input'); var resultAssembly = $(this).prevAll('div#ResultAssembly').find('ul li input');
resultAssembly.attr('checked', 'checked'); resultAssembly.attr('checked', 'checked');
@ -85,7 +85,7 @@
} }
}); });
$('a.form_frontend_function.untick_all_result_assembly').concrete({ $('a.form_frontend_function.untick_all_result_assembly').entwine({
onclick: function(e) { onclick: function(e) {
var resultAssembly = $(this).prevAll('div#ResultAssembly').find('ul li input'); var resultAssembly = $(this).prevAll('div#ResultAssembly').find('ul li input');
resultAssembly.removeAttr('checked'); resultAssembly.removeAttr('checked');
@ -96,7 +96,7 @@
/** /**
* Table record handler for search result record * Table record handler for search result record
*/ */
$('.resultsTable tbody td').concrete({ $('.resultsTable tbody td').entwine({
onclick: function(e) { onclick: function(e) {
var firstLink = this.find('a[href]'); var firstLink = this.find('a[href]');
if(!firstLink) return; if(!firstLink) return;
@ -108,7 +108,7 @@
/** /**
* Add object button * Add object button
*/ */
$('#Form_ManagedModelsSelect').concrete({ $('#Form_ManagedModelsSelect').entwine({
onsubmit: function(e) { onsubmit: function(e) {
className = $('select option:selected', this).val(); className = $('select option:selected', this).val();
requestPath = this.attr('action').replace('ManagedModelsSelect', className + '/add'); requestPath = this.attr('action').replace('ManagedModelsSelect', className + '/add');
@ -128,7 +128,7 @@
/** /**
* RHS panel Delete button * RHS panel Delete button
*/ */
$('#Form_EditForm input[name=action_doDelete]').concrete({ $('#Form_EditForm input[name=action_doDelete]').entwine({
onclick: function(e) { onclick: function(e) {
if(!confirm(ss.i18n._t('ModelAdmin.REALLYDELETE', 'Really delete?'))) { if(!confirm(ss.i18n._t('ModelAdmin.REALLYDELETE', 'Really delete?'))) {
this.removeClass('loading'); this.removeClass('loading');
@ -140,7 +140,7 @@
/** /**
* Toggle import specifications * Toggle import specifications
*/ */
$('.importSpec').concrete({ $('.importSpec').entwine({
onmatch: function() { onmatch: function() {
this.hide(); this.hide();
this.find('a.detailsLink').click(function() { this.find('a.detailsLink').click(function() {

View File

@ -1,10 +1,10 @@
(function($) { (function($) {
$.concrete('ss', function($){ $.entwine('ss', function($){
/** /**
* @class Tree panel. * @class Tree panel.
* @name ss.sitetree * @name ss.sitetree
*/ */
$('#sitetree').concrete(/** @lends ss.sitetree */{ $('#sitetree').entwine(/** @lends ss.sitetree */{
onmatch: function() { onmatch: function() {
// make sure current ID of loaded form is actually selected in tree // make sure current ID of loaded form is actually selected in tree
var id = $('#Form_EditForm :input[name=ID]').val(); var id = $('#Form_EditForm :input[name=ID]').val();

View File

@ -19,11 +19,11 @@
* which is most likely a form submission. * which is most likely a form submission.
*/ */
$(window).bind('load', function(e) { $(window).bind('load', function(e) {
$('#MemberImportFormIframe,#GroupImportFormIframe').concrete({ $('#MemberImportFormIframe,#GroupImportFormIframe').entwine({
onmatch: function() { onmatch: function() {
this._super(); this._super();
// TODO concrete can't seem to bind to iframe load events // TODO entwine can't seem to bind to iframe load events
$(this).bind('load', refreshAfterImport); $(this).bind('load', refreshAfterImport);
} }
}); });
@ -33,7 +33,7 @@
* Delete selected folders through "batch actions" tab. * Delete selected folders through "batch actions" tab.
*/ */
$(document).ready(function() { $(document).ready(function() {
$('#Form_BatchActionsForm').concrete('ss').register( $('#Form_BatchActionsForm').entwine('ss').register(
// TODO Hardcoding of base URL // TODO Hardcoding of base URL
'admin/security/batchactions/delete', 'admin/security/batchactions/delete',
function(ids) { function(ids) {
@ -48,8 +48,8 @@
); );
}); });
$.concrete('ss', function($){ $.entwine('ss', function($){
$('#Form_EditForm .Actions #Form_EditForm_action_addmember').concrete({ $('#Form_EditForm .Actions #Form_EditForm_action_addmember').entwine({
onclick: function(e) { onclick: function(e) {
// CAUTION: Assumes that a MemberTableField-instance is present as an editing form // CAUTION: Assumes that a MemberTableField-instance is present as an editing form
var t = $('#Form_EditForm_Members'); var t = $('#Form_EditForm_Members');

View File

@ -56,13 +56,13 @@
// Can't use $('contentPanel'), as its in a different window // Can't use $('contentPanel'), as its in a different window
window.parent.document.getElementById('contentPanel').style.display = "none"; window.parent.document.getElementById('contentPanel').style.display = "none";
// toggle layout panel // toggle layout panel
jQuery('body.CMSMain').concrete('ss').getMainLayout().close('east'); jQuery('body.CMSMain').entwine('ss').getMainLayout().close('east');
} else { } else {
ed.controlManager.setActive(showCommand, true); ed.controlManager.setActive(showCommand, true);
window.parent.document.getElementById('contentPanel').style.display = "block"; window.parent.document.getElementById('contentPanel').style.display = "block";
// toggle layout panel // toggle layout panel
jQuery('body.CMSMain').concrete('ss').getMainLayout().resizeAll(); jQuery('body.CMSMain').entwine('ss').getMainLayout().resizeAll();
jQuery('body.CMSMain').concrete('ss').getMainLayout().open('east'); jQuery('body.CMSMain').entwine('ss').getMainLayout().open('east');
} }
} }