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
<script type="text/javascript">
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}");
</script>
HTML;

View File

@ -221,8 +221,8 @@ class LeftAndMain extends Controller {
// @todo Load separately so the CSS files can be inlined
Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/ui.all.css');
// concrete
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/dist/jquery.concrete-dist.js');
// entwine
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
// Required for TreeTools panel above tree
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.
*
* 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()}.
* The form usually construct itself from {@link DataObject->getCMSFields()}
* 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/cms_right.css');
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::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/cms_right.css');
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::javascript(CMS_DIR . '/javascript/MemberImportForm.js');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,11 +13,11 @@ TreeContextMenu = {
},
'Duplicate page and children' : function(treeNode) {
// 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) {
// 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) {
var children = treeNode.treeNodeHolder().childTreeNodes();

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
(function($) {
$.concrete('ss', function($){
$.entwine('ss', function($){
/**
* @class Base edit form, provides ajaxified saving
@ -14,7 +14,7 @@
* - removeform: A form is about to be removed from the DOM
* - 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.
* Will show inside the <form> tag.
@ -255,7 +255,7 @@
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._setupChangeTracker();
@ -292,9 +292,9 @@
* clicked button from a form.onsubmit event.
* @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) {
jQuery('#Form_EditForm').concrete('ss').ajaxSubmit(this);
jQuery('#Form_EditForm').entwine('ss').ajaxSubmit(this);
return false;
}
});
@ -303,7 +303,7 @@
* @class Add tinymce to HtmlEditorFields within the CMS.
* @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() {
tinyMCE.execCommand("mceAddControl", true, this.attr('id'));
this.isChanged = function() {

View File

@ -217,13 +217,13 @@ TreeNodeAPI.prototype = {
this.getPageFromServer();
}
} else {
jQuery('#Form_EditForm').concrete('ss').removeForm();
jQuery('#Form_EditForm').entwine('ss').removeForm();
}
},
getPageFromServer : function() {
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'),
function(response) {
self.removeNodeClass('loading');

View File

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

View File

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

View File

@ -1,11 +1,11 @@
(function($) {
$.concrete('ss', function($){
$.entwine('ss', function($){
/**
* 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),
* checking all boxes is purely presentational.
*/
$('#Permissions .checkbox[value=ADMIN]').concrete({
$('#Permissions .checkbox[value=ADMIN]').entwine({
onmatch: function() {
this.toggleCheckboxes();

View File

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

View File

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

View File

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

View File

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

View File

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