Remove references to ss-ui
This commit is contained in:
parent
03a17029ef
commit
5bb430ef43
|
@ -137,10 +137,11 @@ $.entwine('ss', function($){
|
||||||
selectedEl.siblings().setSelected(false);
|
selectedEl.siblings().setSelected(false);
|
||||||
|
|
||||||
// Disable the "Create" button if none of the pagetypes are available
|
// Disable the "Create" button if none of the pagetypes are available
|
||||||
var buttonState = this.find('#Form_AddForm_PageType div.radio:not(.disabled)').length
|
if(this.find('#Form_AddForm_PageType div.radio:not(.disabled)').length) {
|
||||||
? 'enable'
|
this.find('button[name=action_doAdd]').removeAttr('disabled');
|
||||||
: 'disable';
|
} else {
|
||||||
this.find('button[name=action_doAdd]').button(buttonState);
|
this.find('button[name=action_doAdd]').addAttr('disabled');
|
||||||
|
}
|
||||||
|
|
||||||
this.find('.message-restricted')[allAllowed ? 'hide' : 'show']();
|
this.find('.message-restricted')[allAllowed ? 'hide' : 'show']();
|
||||||
}
|
}
|
||||||
|
|
|
@ -379,15 +379,15 @@ $.entwine('ss', function($){
|
||||||
*/
|
*/
|
||||||
$('.cms-edit-form.changed').entwine({
|
$('.cms-edit-form.changed').entwine({
|
||||||
onmatch: function(e) {
|
onmatch: function(e) {
|
||||||
this.find('button[name=action_save]').button('option', 'showingAlternate', true);
|
this.find('button[name=action_save]').attr('data-showingAlternate', true);
|
||||||
this.find('button[name=action_publish]').button('option', 'showingAlternate', true);
|
this.find('button[name=action_publish]').attr('data-showingAlternate', true);
|
||||||
this._super(e);
|
this._super(e);
|
||||||
},
|
},
|
||||||
onunmatch: function(e) {
|
onunmatch: function(e) {
|
||||||
var saveButton = this.find('button[name=action_save]');
|
var saveButton = this.find('button[name=action_save]');
|
||||||
if(saveButton.data('button')) saveButton.button('option', 'showingAlternate', false);
|
if(saveButton.data('button')) saveButton.attr('data-showingAlternate', false);
|
||||||
var publishButton = this.find('button[name=action_publish]');
|
var publishButton = this.find('button[name=action_publish]');
|
||||||
if(publishButton.data('button')) publishButton.button('option', 'showingAlternate', false);
|
if(publishButton.data('button')) publishButton.attr('data-showingAlternate', false);
|
||||||
this._super(e);
|
this._super(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -397,11 +397,13 @@ $.entwine('ss', function($){
|
||||||
* Bind to ssui.button event to trigger stylistic changes.
|
* Bind to ssui.button event to trigger stylistic changes.
|
||||||
*/
|
*/
|
||||||
onbuttonafterrefreshalternate: function() {
|
onbuttonafterrefreshalternate: function() {
|
||||||
if (this.button('option', 'showingAlternate')) {
|
if (this.data('showingAlternate')) {
|
||||||
this.addClass('ss-ui-action-constructive');
|
this.addClass('btn-primary');
|
||||||
|
this.removeClass('btn-secondary');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.removeClass('ss-ui-action-constructive');
|
this.removeClass('btn-primary');
|
||||||
|
this.addClass('btn-secondary');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -411,11 +413,13 @@ $.entwine('ss', function($){
|
||||||
* Bind to ssui.button event to trigger stylistic changes.
|
* Bind to ssui.button event to trigger stylistic changes.
|
||||||
*/
|
*/
|
||||||
onbuttonafterrefreshalternate: function() {
|
onbuttonafterrefreshalternate: function() {
|
||||||
if (this.button('option', 'showingAlternate')) {
|
if (this.data('showingAlternate')) {
|
||||||
this.addClass('ss-ui-action-constructive');
|
this.addClass('btn-primary');
|
||||||
|
this.removeClass('btn-secondary');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.removeClass('ss-ui-action-constructive');
|
this.removeClass('btn-primary');
|
||||||
|
this.addClass('btn-secondary');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -450,8 +450,9 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||||
// Create the Search and Reset action
|
// Create the Search and Reset action
|
||||||
$actions = new FieldList(
|
$actions = new FieldList(
|
||||||
FormAction::create('doSearch', _t('CMSMain_left_ss.APPLY_FILTER', 'Search'))
|
FormAction::create('doSearch', _t('CMSMain_left_ss.APPLY_FILTER', 'Search'))
|
||||||
->addExtraClass('ss-ui-action-constructive'),
|
->addExtraClass('btn btn-primary'),
|
||||||
ResetFormAction::create('clear', _t('CMSMain_left_ss.CLEAR_FILTER', 'Clear'))
|
ResetFormAction::create('clear', _t('CMSMain_left_ss.CLEAR_FILTER', 'Clear'))
|
||||||
|
->addExtraClass('btn btn-secondary')
|
||||||
);
|
);
|
||||||
|
|
||||||
// Use <button> to allow full jQuery UI styling on the all of the Actions
|
// Use <button> to allow full jQuery UI styling on the all of the Actions
|
||||||
|
|
|
@ -132,10 +132,10 @@ class CMSPageAddController extends CMSPageEditController {
|
||||||
|
|
||||||
$actions = new FieldList(
|
$actions = new FieldList(
|
||||||
FormAction::create("doAdd", _t('CMSMain.Create',"Create"))
|
FormAction::create("doAdd", _t('CMSMain.Create',"Create"))
|
||||||
->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept')
|
->addExtraClass('btn-primary font-icon-plus-circled')
|
||||||
->setUseButtonTag(true),
|
->setUseButtonTag(true),
|
||||||
FormAction::create("doCancel", _t('CMSMain.Cancel',"Cancel"))
|
FormAction::create("doCancel", _t('CMSMain.Cancel',"Cancel"))
|
||||||
->addExtraClass('ss-ui-action-destructive ss-ui-action-cancel')
|
->addExtraClass('btn-secondary')
|
||||||
->setUseButtonTag(true)
|
->setUseButtonTag(true)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -2322,7 +2322,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||||
: _t('CMSMain.ARCHIVE', 'Archive');
|
: _t('CMSMain.ARCHIVE', 'Archive');
|
||||||
$moreOptions->push(
|
$moreOptions->push(
|
||||||
FormAction::create('archive', $title)
|
FormAction::create('archive', $title)
|
||||||
->addExtraClass('delete ss-ui-action-destructive')
|
->addExtraClass('delete btn btn-secondary')
|
||||||
->setDescription(_t(
|
->setDescription(_t(
|
||||||
'SiteTree.BUTTONDELETEDESC',
|
'SiteTree.BUTTONDELETEDESC',
|
||||||
'Remove from draft/live and send to archive'
|
'Remove from draft/live and send to archive'
|
||||||
|
@ -2334,8 +2334,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||||
if ($canEdit && $isOnDraft) {
|
if ($canEdit && $isOnDraft) {
|
||||||
$majorActions->push(
|
$majorActions->push(
|
||||||
FormAction::create('save', _t('SiteTree.BUTTONSAVED', 'Saved'))
|
FormAction::create('save', _t('SiteTree.BUTTONSAVED', 'Saved'))
|
||||||
->setAttribute('data-icon', 'accept')
|
->addExtraClass('btn-primary font-icon-check-mark')
|
||||||
->setAttribute('data-icon-alternate', 'addpage')
|
->setUseButtonTag(true)
|
||||||
->setAttribute('data-text-alternate', _t('CMSMain.SAVEDRAFT','Save draft'))
|
->setAttribute('data-text-alternate', _t('CMSMain.SAVEDRAFT','Save draft'))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -2344,14 +2344,14 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||||
// "publish", as with "save", it supports an alternate state to show when action is needed.
|
// "publish", as with "save", it supports an alternate state to show when action is needed.
|
||||||
$majorActions->push(
|
$majorActions->push(
|
||||||
$publish = FormAction::create('publish', _t('SiteTree.BUTTONPUBLISHED', 'Published'))
|
$publish = FormAction::create('publish', _t('SiteTree.BUTTONPUBLISHED', 'Published'))
|
||||||
->setAttribute('data-icon', 'accept')
|
->addExtraClass('font-icon-check-mark-2')
|
||||||
->setAttribute('data-icon-alternate', 'disk')
|
->setUseButtonTag(true)
|
||||||
->setAttribute('data-text-alternate', _t('SiteTree.BUTTONSAVEPUBLISH', 'Save & publish'))
|
->setAttribute('data-text-alternate', _t('SiteTree.BUTTONSAVEPUBLISH', 'Save & publish'))
|
||||||
);
|
);
|
||||||
|
|
||||||
// Set up the initial state of the button to reflect the state of the underlying SiteTree object.
|
// Set up the initial state of the button to reflect the state of the underlying SiteTree object.
|
||||||
if($stagesDiffer) {
|
if($stagesDiffer) {
|
||||||
$publish->addExtraClass('ss-ui-alternate');
|
$publish->addExtraClass('btn-primary');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="view-controls">
|
<div class="view-controls">
|
||||||
<button id="filters-button" class="icon-button font-icon-search no-text" title="<% _t('CMSPagesController_Tools_ss.FILTER', 'Filter') %>"></button>
|
<button id="filters-button" class="btn btn-secondary icon-button font-icon-search no-text" title="<% _t('CMSPagesController_Tools_ss.FILTER', 'Filter') %>"></button>
|
||||||
<div class="icon-button-group">
|
<div class="icon-button-group">
|
||||||
<%-- Change to data-pjax-target="Content-PageList" to enable in-edit listview --%>
|
<%-- Change to data-pjax-target="Content-PageList" to enable in-edit listview --%>
|
||||||
<a class="cms-panel-link icon-button font-icon-tree page-view-link <% if $ViewState == 'treeview' %>active<% end_if %>"
|
<a class="cms-panel-link icon-button font-icon-tree page-view-link <% if $ViewState == 'treeview' %>active<% end_if %>"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="toolbar toolbar--content cms-content-toolbar">
|
<div class="toolbar toolbar--content cms-content-toolbar">
|
||||||
<div class="cms-actions-buttons-row">
|
<div class="cms-actions-buttons-row">
|
||||||
<a class="ss-ui-button cms-content-addpage-button tool-button font-icon-plus" href="$LinkPageAdd" data-url-addpage="{$LinkPageAdd('', 'ParentID=%s')}"><% _t('CMSMain.AddNewButton', 'Add new') %></a>
|
<a class="btn btn-primary cms-content-addpage-button tool-button font-icon-plus" href="$LinkPageAdd" data-url-addpage="{$LinkPageAdd('', 'ParentID=%s')}"><% _t('CMSMain.AddNewButton', 'Add new') %></a>
|
||||||
|
|
||||||
<% if $View == 'Tree' %>
|
<% if $View == 'Tree' %>
|
||||||
<button type="button" class="cms-content-batchactions-button tool-button font-icon-check-mark-2" data-toolid="batch-actions">
|
<button type="button" class="cms-content-batchactions-button btn btn-secondary tool-button font-icon-check-mark-2" data-toolid="batch-actions">
|
||||||
<% _t("CMSPagesController_ContentToolbar_ss.MULTISELECT","Batch actions") %>
|
<% _t("CMSPagesController_ContentToolbar_ss.MULTISELECT","Batch actions") %>
|
||||||
</button>
|
</button>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
Loading…
Reference in New Issue