mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-03 22:58:36 +02:00
commit
4e5e88ef2d
@ -3,11 +3,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
|
$.entwine('ss', function($){
|
||||||
/**
|
/**
|
||||||
* Delete selected folders through "batch actions" tab.
|
* Delete selected folders through "batch actions" tab.
|
||||||
*/
|
*/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#Form_BatchActionsForm').entwine('ss').register(
|
$('#Form_BatchActionsForm').register(
|
||||||
// TODO Hardcoding of base URL
|
// TODO Hardcoding of base URL
|
||||||
'admin/assets/batchactions/delete',
|
'admin/assets/batchactions/delete',
|
||||||
function(ids) {
|
function(ids) {
|
||||||
@ -22,8 +23,6 @@
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
$.entwine('ss', function($){
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load folder detail view via controller methods
|
* Load folder detail view via controller methods
|
||||||
* rather than built-in GridField view (which is only geared towards showing files).
|
* rather than built-in GridField view (which is only geared towards showing files).
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
self.updateTypeList();
|
self.updateTypeList();
|
||||||
});
|
});
|
||||||
this.updateTypeList();
|
this.updateTypeList();
|
||||||
|
this._super();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
(function($) {
|
(function($) {
|
||||||
|
|
||||||
$.entwine('ss', function($){
|
$.entwine('ss.tree', function($){
|
||||||
$('.cms-tree').entwine({
|
$('.cms-tree').entwine({
|
||||||
getTreeConfig: function() {
|
getTreeConfig: function() {
|
||||||
var self = this, config = this._super(), hints = this.getHints();
|
var self = this, config = this._super(), hints = this.getHints();
|
||||||
@ -18,7 +18,7 @@
|
|||||||
'label': '<span class="jstree-pageicon"></span>' + val.ssname,
|
'label': '<span class="jstree-pageicon"></span>' + val.ssname,
|
||||||
'_class': 'class-' + val.pagetype,
|
'_class': 'class-' + val.pagetype,
|
||||||
'action': function(obj) {
|
'action': function(obj) {
|
||||||
$('.cms-container').loadPanel(ss.i18n.sprintf(
|
$('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf(
|
||||||
self.data('urlAddpage'), id, val.pagetype
|
self.data('urlAddpage'), id, val.pagetype
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@
|
|||||||
'edit': {
|
'edit': {
|
||||||
'label': ss.i18n._t('Tree.EditPage'),
|
'label': ss.i18n._t('Tree.EditPage'),
|
||||||
'action': function(obj) {
|
'action': function(obj) {
|
||||||
$('.cms-container').loadPanel(ss.i18n.sprintf(
|
$('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf(
|
||||||
self.data('urlEditpage'), obj.data('id')
|
self.data('urlEditpage'), obj.data('id')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@
|
|||||||
menuitems['addsubpage'] = {
|
menuitems['addsubpage'] = {
|
||||||
'label': ss.i18n._t('Tree.AddSubPage'),
|
'label': ss.i18n._t('Tree.AddSubPage'),
|
||||||
'action': function(obj) {
|
'action': function(obj) {
|
||||||
$('.cms-container').loadPanel(ss.i18n.sprintf(
|
$('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf(
|
||||||
self.data('urlAddpage'), id, 'Page'
|
self.data('urlAddpage'), id, 'Page'
|
||||||
));
|
));
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* File: ReportAdmin.Tree.js
|
* File: ReportAdmin.Tree.js
|
||||||
*/
|
*/
|
||||||
(function($) {
|
(function($) {
|
||||||
$.entwine('ss', function($){
|
$.entwine('ss.tree', function($){
|
||||||
/**
|
/**
|
||||||
* Class: .cms-tree
|
* Class: .cms-tree
|
||||||
*
|
*
|
||||||
@ -14,6 +14,9 @@
|
|||||||
var id = $('.cms-edit-form :input[name=ID]').val();
|
var id = $('.cms-edit-form :input[name=ID]').val();
|
||||||
if (id) this[0].setCurrentByIdx(id);
|
if (id) this[0].setCurrentByIdx(id);
|
||||||
|
|
||||||
|
this._super();
|
||||||
|
},
|
||||||
|
onunmatch: function() {
|
||||||
this._super();
|
this._super();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user