Commit Graph

72 Commits

Author SHA1 Message Date
Daniel Hensby
cf29b2c146
Merge remote-tracking branch '3.1.19' into 3.2.4 2016-05-05 11:17:45 +01:00
Daniel Hensby
3c0f2e8e11
[SS-2015-029] FIX Add CSFR protection to tree reorganise 2016-04-19 00:01:04 +01:00
Damian Mooyman
e07f80014c Merge remote-tracking branch 'origin/3.1' into 3.2
Conflicts:
	lang/cs.yml
	lang/sk.yml
2015-11-03 11:10:46 +13:00
Stephen Shkardoon
6030854725 Fix page reordering bug with ParentID
If you are viewing PageA in the CMS, but move PageB into PageC,
the edit form will recieve an edit form ParentID of PageC.
This is incorrect, as only PageB had it's ParentID change.
2015-10-12 20:10:48 +13:00
David Craig
f6745a3feb Fix new page SiteTree nesting 2015-06-23 16:53:38 +12:00
Damian Mooyman
a72bd16f42 API Deprecate delete in favour of archive
Remove "delete from live" duplicate action in favour of existing "unpublish" which is more consistent with current terminology
Add pop-up verification to destructive actions
Fix bug in reporting publishing of error pages
Restoring a page also restores parents
2015-06-03 14:24:27 +12:00
Damian Mooyman
0b4f62dfd8 BUG Fix jstree when duplicating subtrees 2014-04-29 16:00:07 +12:00
Ingo Schommer
6c96c490c6 Load tree parent nodes if non-existant
This edge case can occur when a large tree is cached in HTML already,
without any nodes expanded via ajax. If a new node is added with
a parent that's not existant, it was simply placed on the root node.
This is a display bug, a full CMS refresh fixes it.

Fixes a related bug where tree causes (view) duplicates,
where the same node is rendered twice. This was due to the whole
subtree being refreshed (including the new node) through jstree's
built-in "open"/"select" events, while at the same time
creating a new node through updateNodesFromServer() callbacks.

Also added a global tree loading indication to make it clear
that the tree is still processing.

See https://github.com/silverstripe/silverstripe-cms/issues/872
2013-10-11 11:51:11 +02:00
Ingo Schommer
67d1327b90 Avoid collision of status flags in tree items when updating tree nodes
Fixes silverstripe/silverstripe-cms#445
See https://github.com/silverstripe/silverstripe-framework/pull/1996
Thanks to Jean-Fabien for getting this started
2013-05-25 11:27:50 +02:00
jean
412f58b559 FIX #8322 Use POST instead of GET when using LeftAndMain::savetreenode so large site trees can be reorganised as well 2013-03-15 10:16:33 +13:00
Ingo Schommer
1bb109041f FIX Node updates in IE without non-object error
Bug was most prominent after page publication,
which triggers a node reload. It iterated through
all node attributes to assign them to the existing node,
which apparently includes some non-scalar attributes
that can't simply be copied in IE.
2013-01-31 18:59:20 +01:00
Simon Welsh
fc5dd2994c Add codesniffer that ensures indentation is with tabs. 2012-12-12 00:12:11 +13:00
Saophalkun Ponlu
9fe99cfec9 Batch actions UI enhancement (#7878) 2012-11-02 22:57:14 +01:00
Sean Harvey
b186626b73 BUG If a nested page editable but parent not, user can't expand tree
If you're logged in as a specific user in a group who has view/edit
permissions of a page that has a parent page which doesn't have
permissions, you can't expand the tree node to get access to that
nested page.

This fixes LeftAndMain.Tree.js to allow expanding if there are
immediate children tree nodes that are not disabled. Also fixes
styling so that only immediate children nodes are greyed out.

Fixes this ticket: http://open.silverstripe.org/ticket/7913
2012-09-28 12:18:34 +12:00
Saophalkun Ponlu
c3d622c910 BUG: Fix an issue caused by moving a page from one location in the tree to another location doesn't update parent id in the edit form immediately (see #7740)
The issue causes the moved page to revert to previous location when Save and Publish before any page refresh or page switching.
This commit also adds 'Modified' badge to the moved page
2012-08-29 20:33:03 +12:00
Ingo Schommer
5a44ea2e20 Deselect tree nodes when reacting to form load event (fixes #7401)
Multiselected nodes are only possible in batch mode,
which would never trigger a form load event.
2012-08-27 16:49:06 +02:00
Ingo Schommer
ae9c2e78a1 BUG Restore tree children after updateNode() (fixes #7761) 2012-08-22 15:38:54 +02:00
Niklas Forsdahl
a85530991c BUG: javascript tree node updating fails when Translatable is used
Automatic tree node updating fails when for example creating a new
translation, due to the update URL containing two question marks,
due to the locale get parameter.

Fixed by using the $.path.addSearchParams utility function, which properly
checks for existing query string parameters.
2012-08-03 13:36:37 +03:00
Hamish Friedlander
22d6c7afa4 BUG Updating node would position wrong, Sort isnt === offset 2012-07-23 22:15:11 +12:00
Ingo Schommer
120de7cba2 NEW Tree node updates after save (fixes #7450, #7389)
- Updates icon, badges, title, and position in hierarchy
- New LeftAndMain_TreeNode API to allow rendering of single tree nodes
without their hierarchy, extracted from LeftAndMain->getSiteTreeFor()
- New LeftAndMain->updatetreenodes() endpoint to request updated state
for one or more nodes. Triggered on demand by form refreshes.
2012-07-23 17:21:49 +12:00
Hamish Friedlander
daa226a9af BUGFIX: Fix trac ticket #7476
We missed making an event delegatable in https://github.com/silverstripe/sapphire/pull/542
the result was 7476 wasnt actually fixed
2012-06-22 10:46:03 +12:00
Sean Harvey
c6039ae8d1 BUGFIX When updating the tree from EditForm, ensure we only change the
text of the tree node for the first .text element, instead of the nested
ones.
2012-06-20 22:00:19 +12:00
Hamish Friedlander
c12db51c22 BUGFIX: Fix trac/7485 2012-06-18 10:23:04 +12:00
Sam Minnée
7ce7ac406e Merge pull request #528 from mango9/master
Ticket #5578
2012-06-14 16:43:20 -07:00
Hamish Friedlander
b86a787521 BUGFIX: Use new jQuery.Entwine event capturing, onadd and onremove features to plug some memory leaks 2012-06-15 01:19:15 +02:00
Paul Meyrick
882b4267cb BUGFIX: Ticket #5578 SiteTree->CanCreateTopLevel() doesn't change dragged tree nodes or ParentID changes 2012-06-14 17:17:27 +12:00
Ingo Schommer
ce3d48e310 MINOR Supressed dependencies of tree logic on SiteTree elements (not properly isolated to work well with Folder objects) 2012-06-13 00:51:53 +02:00
Ingo Schommer
896d198890 BUGFIX Correct DOM structure on updating tree nodes from edit forms, adding badge classes to force strike-through styling on deleted nodes (see #7410) 2012-06-12 19:16:34 +02:00
Ingo Schommer
2637969bcd API CHANGE Renamed JS event from 'reloadeditform' on 'aftersubmitform', 'beforesave' to 'beforesubmitform'. Listening to bubbled event on container to avoid binding to forms which are removed before the event is triggered. 2012-06-12 17:13:36 +02:00
Ingo Schommer
69d3497497 MINOR Fixed node deselection when changing areas (e.g. "pages" to "edit page") 2012-06-04 11:05:05 +02:00
Ingo Schommer
c18c29f464 BUGFIX Updating tree state (after adding/renaming nodes, changing parent). Deselecting nodes when switching to edit view (fixes #7389, #7336, #7309) 2012-06-03 18:48:47 +02:00
Ingo Schommer
460148c12a MINOR Debug messages for tracking down JS layout sequence issues (disabled by default) 2012-06-02 12:31:55 +02:00
Mateusz Uzdowski
8d469b66c8 BUGFIX: add missing onunmatches 2012-05-23 16:24:15 +12:00
Mateusz Uzdowski
97e00a35dd BUGFIX: add missing onunmatches causing exceptions in entwine 2012-05-18 14:27:09 +12:00
Mateusz Uzdowski
6e436b54f4 BUGFIX: change namespace for the tree so all matchers are executed
.cms-tree.multiple matcher would not execute, because .cms-tree from
another file is overriding it (and the element is marked as resolved by
entwine). We need to move it to a separate namespace.
2012-05-18 12:27:30 +12:00
Mateusz Uzdowski
37399f88db BUGFIX: add missing _super calls to all matchers and unmatchers
Otherwise some matchers might not be triggered as expected.
2012-05-18 12:27:30 +12:00
Sean Harvey
1e8a89db8f MINOR Upgrade jQuery dependency to 1.7.2 2012-05-10 16:21:11 +12:00
Ingo Schommer
4c2352f908 MINOR Don't trigger on click on construction of view-model toggles, as it bubbles up to the panel, where it causes a toggle action which overrides any previous user choices stored in cookies (fixes #7210) 2012-05-01 14:10:09 +02:00
Ingo Schommer
0ef5d0b84f MINOR Moved tree filtering in LeftAndMain from SiteTreeAsUL() into getSiteTreeFor() to allow filtering the initial tree (via GET parameters), rather than just through getsubtree() 2012-04-17 16:07:22 +02:00
Simon Welsh
3a6341a251 API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
Ingo Schommer
3390ea390f MINOR Updating tree nodes on each state change, rather than just listening to form reloads 2012-04-10 12:28:10 +02:00
Ingo Schommer
d46a4504f5 MINOR Fixed scope problems caused by separating out getTreeConfig() 2012-03-12 14:44:09 +01:00
Ingo Schommer
e5ade1ba12 MINOR Making tree config overrideable 2012-03-12 11:40:08 +01:00
Ingo Schommer
08c3e7edf3 MINOR More flexible form detection in LeftAndMain.Tree.js 2012-03-08 18:22:30 +01:00
Ingo Schommer
f39680206a BUGFIX Fixed $('.cms-tree').getNodeByID(), was always returning tree instance instead of node because 'get_node' isn't a public method, hence ignored 2012-03-06 21:38:35 +01:00
Ingo Schommer
ea4bbe594c ENHANCEMENT Allowing individual parent selection in tree, rather than auto-selecting children (precondition for applying batch actions independently) 2012-03-06 21:38:35 +01:00
Ingo Schommer
746e3ea05e MINOR Avoid applying jstree plugin multiple times when onmatch is called on CSS class changes, rather than DOM insertions 2012-03-06 21:38:34 +01:00
Ingo Schommer
0c6bc2f7a1 MINOR Moving Tree.js entwine rules into namespace (wasn't applying multiple/draggable toggles because of that) 2012-03-06 21:38:34 +01:00
Normann Lou
f7030c56a5 BUGFIX: Page tree node reflects any changes made to page (title, publication status) in its edit view, implemented on the level of cms-content dom element, rather than cms-edit-form level 2012-02-27 12:47:36 +13:00
Normann Lou
587d195647 BUGFIX: Page tree node reflects any changes made to page (title, publication status) in its edit view 2012-02-24 16:46:46 +13:00