Commit Graph

141 Commits

Author SHA1 Message Date
Mateusz Uzdowski
fdb4a1d871 BUG Enable dropdown so alignment on images can be updated. 2013-05-13 10:08:03 +12:00
Ingo Schommer
9856fcef21 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	javascript/DateField.js
	model/DataQuery.php
	model/Versioned.php
	tests/forms/RequirementsTest.php
	tests/model/DataObjectLazyLoadingTest.php
	view/Requirements.php
2013-04-09 14:45:35 +02:00
Sam Minnée
39a4aabcdc Merge pull request #778 from patbolo/bugfix/7853
FIX 7853
2013-04-08 16:08:23 -07:00
Ingo Schommer
8bedf485d6 Don't fail TinyMCE cleanup if no current instance is set
Bug has been observed in IE8
2013-03-20 14:46:28 +01:00
Ingo Schommer
e0e481fc46 Removed stray code from HTMLEditorField.js 2013-03-15 12:01:45 +01:00
Wernervanrun
fade5cce51 Update javascript/HtmlEditorField.js
we only want this .ss-uploadfield-files - else we get all ss-uploadfield-files wich include the ones not related to #tinymce insertmedia
2013-03-07 20:33:02 +01:00
Sean Harvey
6a1fe05191 Merge pull request #1151 from silverstripe-rebelalliance/bug/image_reedit_attr
FIX Assiging width to caption instead of container
2013-01-31 13:23:36 -08:00
Hamish Friedlander
aa3eb98de2 FIX Assiging width to caption instead of container 2013-02-01 10:17:56 +13:00
Ingo Schommer
dc75d9a5b4 Merge pull request #1149 from silverstripe-rebelalliance/bug/image_reedit_attr
FIX A couple of bugs integrating the SilverStripe media panel with TinyMCE
2013-01-31 15:24:51 +01:00
Hamish Friedlander
6f937745b0 FIX Not being able to remove, add or edit the caption on an image properly 2013-01-31 16:35:48 +13:00
Ingo Schommer
0b44d8fbfb Merge pull request #1145 from silverstripe-rebelalliance/bug/image_reedit_attr
FIX Not calling updateFromNode on re-opening an image
2013-01-30 14:52:50 +01:00
Hamish Friedlander
9f822d1e3c FIX Not calling updateFromNode on re-opening an image
Inside mediaform updateFromEditor we called $(this).updateFromNode, but this wasnt
pointing to anything useful after a refactor, which resulted in the fields not
being filled in with current data when editing an already-inserted image
2013-01-30 17:15:01 +13:00
Mateusz Uzdowski
6c78bf9be9 BUG Flush editors on form submission (os#8222)
Otherwise some non-textual changes such as moving images and resizing
them could be missed when saving.

This is because TinyMCE does not treat the image move/resize as an
undolevel and does not register this via regular "onChange" event.
2013-01-30 11:54:29 +13:00
Kirk Mayo
d12ae82f70 Bug fix for open/8181 which stops the HTML source editor window saving/publishing 2013-01-21 08:26:19 +01:00
Ingo Schommer
f30277c3cf Split out getLinkAttributes() in .htmleditor JavaScript for more flexibility
Saves us from overwriting the whole insertLink() method just
to add another option.
2013-01-14 16:54:58 +01:00
Ingo Schommer
d13c53fda6 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	tests/model/DataQueryTest.php
2012-12-14 10:57:28 +01:00
Loz Calver
639cc0222c BUG Fix insert media form inserting images from other UploadFields (fixes #8051)
The insert media form would pick up unwanted images from other
UploadFields. Limiting where it is looking to only the closest form
fixes this.
2012-12-12 15:55:33 +00:00
Simon Welsh
b0121b541c Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
Simon Welsh
fc5dd2994c Add codesniffer that ensures indentation is with tabs. 2012-12-12 00:12:11 +13:00
Ingo Schommer
fa84c2d705 Merge remote-tracking branch 'origin/3.0' 2012-12-10 17:50:43 +01:00
Ingo Schommer
b15b5cd115 Ability to replace entire content in HTMLEditorField JS API 2012-12-10 15:39:15 +01:00
Sean Harvey
6ce6f9a2c1 Merge branch '3.0' 2012-11-26 17:17:41 +13:00
UndefinedOffset
4310718b94 BUG Insert Media, inserts all previous media (fixes #7545) 2012-11-23 17:37:39 +01:00
Mateusz Uzdowski
b02b1e6dbc API Forward the editor events to underlying textarea.
Makes the editor API more flexible by triggering generic JS events that
can be used from entwine. This makes it easier to add event handlers to
the editor and cleans up the initialisation call from unrelated code.

The patching code also forwards editor changes to the textarea field,
which in perspective will allow the changetracker to react to changes in
this field as they happen.
2012-11-23 00:50:18 +01:00
Normann Lou
5152164d17 BUGFIX: Multiple HTMLEditorFields not redrawing, fix by storing its container object before setting timeout 2012-11-05 11:56:29 +13:00
Ingo Schommer
680baab925 BUG Delay HTMLEditorField showing (TinyMCE workaround)
Delayed show because TinyMCE calls hide() via
setTimeout on removing an element,
which is called in quick succession with adding a new editor
after ajax loading new markup

See e0378ceb77
and https://github.com/silverstripe/sapphire/pull/847
2012-10-08 21:44:03 +02:00
jean
17bd8733d0 FIX 7853 Flush the content of drop down fields when closing html editor linker (links and images) 2012-09-10 11:12:05 +12:00
Ingo Schommer
3b592122fd i18n for "select an anchor" string (see #7798) 2012-08-26 23:58:31 +02:00
Ingo Schommer
a033ddf773 More init checks in HtmlEditorField.js 2012-07-16 23:33:22 +02:00
Mateusz Uzdowski
7c41ff22ab BUG Change all shortcodes into the new, comma separated, format.
Space delimiter is often confused by browsers, and encoded as %20 which
breaks the shortcode system. Change to comma delimitation has already
been implemented, this is a followup cleanup.

Ref http://open.silverstripe.org/ticket/7337
2012-07-12 16:44:21 +12:00
Mateusz Uzdowski
29a039929b Refactor the linking functionality for the TinyMCE popup.
Functionality that affects the values in the form better fits in
updateFromEditor function, where we expect the form to be modified.
Redraw should only affect visibility parameters.

Also added a more robust reset code, so we can always expect to get at
least a clean form, and re-added missing "target" checkbox.
2012-07-12 16:44:15 +12:00
Mateusz Uzdowski
eef67b6f87 API Clean up the return values for getCurrentLink
Returning a link type "internal" in the situation when no link has been
detected is confusing and makes it hard to know downstream if the link
was detected or not. Switched that to null.

Also added target option to file downloads, as we don't currently have a
mechanism to default this field to "yes" for files.
2012-07-12 09:13:32 +12:00
Ingo Schommer
682a6a0d1b BUGFIX "Insert media" loading indicator (fixes #7542)
No "working" indicator in insert media from web button.
Returning the $.ajax object to allow for deferred callbacks
on events other than 'success'
2012-06-22 10:25:15 +02:00
Hamish Friedlander
65030906ad BUGFIX: Add validation to fix open.silverstripe.org ticket #7494
When adding media via the HtmlEditorField dialog, the value of the URL field wasnt being validated. Youd get different errors depending on if the field was empty
or if it had text, but it didnt look like an absolute URL to HtmlEditorField#viewfile.

This adds some javascript validation to make the text field look like a URL field
2012-06-21 14:19:41 +12:00
Hamish Friedlander
ef11a0dc78 BUGFIX: Fix trac ticket 7081
IE contentEditable carets and selection boxes show on top of any elements, interfering with HtmlEditorFields dialogs.
This fixes that by storing the selection prior to opening the dialog, then unselecting everything. On dialog close the
selection is restored
2012-06-20 15:27:56 +12:00
Ingo Schommer
40cef4d584 MINOR Fixed event naming 2012-06-15 01:19:21 +02:00
Hamish Friedlander
1085fd29be BUGFIX: TinyMCE isnt unbinding formatselect or styleselect which leaks memory. We should really fix TinyMCE, but lets just brute-force it for now. 2012-06-15 01:19:19 +02: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
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
Naomi Guyer
e96ca5fb9a ENHANCEMENT: Change media insertion to use button and apply design
Conflicts:

	css/UploadField.css
	scss/UploadField.scss
2012-06-11 10:54:48 +02:00
Ingo Schommer
2ecd8a0cc4 MINOR Hiding "insert media" tabs when editing an image (wrong selector) 2012-06-08 18:40:34 +02:00
Naomi Guyer
7523f98e04 BUGFIXES: File Uploads
* Add arrows back to edit-all toggle button
* Don't show dimensions if the item being inserted doesn't have them.
* Set pop-up windows to be a percentage of the window height for better
use of space
* Fix broken fieldholdersmall styling within files edit
* Add placeholder if no preview
*Take out minFileSize so upload will work on Android phones
2012-06-08 18:40:33 +02:00
Sean Harvey
0235a8c0c7 BUGFIX Partially reverting 28e43bdc which broke media insertion 2012-05-28 22:27:20 +12:00
Naomi Guyer
28e43bdc88 ENHANCEMENT: File/Image UI fixes
* Replaced cancel/delete button in files area
* Consolidated Image upload styles with AssetUpload styles
* Changed name of step 2 in image upload
* Made image editing hidden by default, so multiple files can be seen,
and added ability top open and close
* Tweaked styles in on page upload field (status colour and file name
width)
2012-05-28 11:50:34 +12:00
Simon Welsh
31db970fb2 BUGFIX Set Editor if getEditor() is null rather than onmatch 2012-05-24 23:39:53 +02:00
Simon Welsh
bb29ff3611 FEATURE: Allow adding media to the CMS using oEmbed 2012-05-24 17:00:21 +12:00
Mateusz Uzdowski
8d469b66c8 BUGFIX: add missing onunmatches 2012-05-23 16:24:15 +12:00
Ingo Schommer
0cbb1b11e3 MINOR Fixed async entwine redraw calls in HtmlEditorField.js (regression from fdebedd1) 2012-05-20 13:35:12 +02:00
Ingo Schommer
7ab47b6493 MINOR Moved redundant toggleLooks() logic in HtmlEditorField.js to existing redraw() logic 2012-05-20 13:34:18 +02: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
Ingo Schommer
f01ca808db MINOR More robust path concat in HtmlEditorField.js (means it doesn't break with translatable module enabled) 2012-05-16 00:10:08 +02:00
Sean Harvey
fdebedd103 BUGFIX Ensure the form inside htmleditorfield-dialog element is redrawn when the form is lazy loaded by AJAX. 2012-05-09 17:11:59 +12:00
Normann Lou
ca38b25014 BUGFIX: add CloseButton back, only hidde it when editing an image that loaded from content area.
ENHANEMENT: remove call of toogleLooks() from redraw(), only call toggleLooks() when needed.
MINOR: code minimazing / code convention.
2012-04-20 18:04:50 +12:00
Normann Lou
e1372b3794 ENHANCEMENT: toggle header and action label for image dialog popups (from content TinyMCE image icon) 2012-04-20 18:04:49 +12:00
Ingo Schommer
14895a2056 BUGFIX Only call TinyMCE.init() once per window load (actual editor creation happens through new tinymce.Editor() 2012-04-18 17:38:24 +02:00
Ingo Schommer
f26951c63d MINOR Don't try to remove editor containers before they exist 2012-04-18 16:54:20 +02:00
Sean Harvey
5bb31c4e81 BUGFIX Stop "Insert Link" or "Insert Image" header disappearing inside the HtmlEditorField toolbar
when clicking a link type
2012-04-17 15:47:40 +12:00
Ingo Schommer
b025b95ede ENHANCEMENT Lazy-loading image and link dialogs for HtmlEditorField, to avoid unnecessary processing overhead on initial CMS load (also means they'll never get loaded if not required, e.g. in ReportAdmin) 2012-04-12 23:53:12 +02:00
Ingo Schommer
ac45e5b9c0 Merge branch 'integration'
Conflicts:
	admin/css/ie8.css
	admin/css/screen.css
	admin/scss/_style.scss
	dev/install/config-form.html
	dev/install/install.css
	dev/install/php5-required.html
2012-04-11 16:31:12 +02:00
Ingo Schommer
a64715beeb BUGFIX Calling tinyMCE.init() in sync with entwine rules to avoid uncached loading interfereing with call order (fixes #6877) 2012-04-10 21:41:00 +02:00
Ingo Schommer
8c5e56fe31 Merge branch 'master' into integration
Conflicts:
	admin/css/screen.css
	dev/install/php5-required.html
2012-04-09 21:10:08 +02:00
Sean Harvey
6f89fe0703 BUGFIX Show/hide correct fields when inserting a link in HtmlEditorField 2012-04-05 16:50:49 +12:00
Julian Seidenberg
64d0cbab9a BUGFIX: SSF-38 hiding the insert image controls when editing an already inserted image. 2012-04-05 12:10:35 +12:00
Julian Seidenberg
7f8a682ad7 BUGFIX: SSF-38 fixing the "Choose files from your computer" upload field 2012-04-04 13:46:24 +12:00
Sean Harvey
89267419d4 BUGFIX When inserting an image in HtmlEditorField, don't append "px" as
the width and height attributes only accept a number without a unit
2012-04-02 14:10:20 +12:00
Julian Seidenberg
2110906715 BUGFIX: SSF-38 making the entwine selector for the upload field more specific, so it doesn't apply to every upload field in the CMS. Also, handling the case of uploading multiple files at once 2012-03-30 13:45:53 +13:00
Julian Seidenberg
9f9dc25338 ENHANCEMENT: SSF-38 initial rearranging of the insert image form to allow uploads as well as choosing an image from the CMS (and you can pick and choose from both) 2012-03-29 13:34:55 +13:00
Sean Harvey
49267dbbc4 ENHANCEMENT Shortcodes now support commas as delimiter for attributes (thanks aoneil for help with the regex!) (trac #6868)
BUGFIX HtmlEditorField not inserting shortcodes correctly (trac #6868)
2012-03-09 14:25:42 +13:00
Sean Harvey
898c8f5497 ENHANCEMENT [file_link id=n] shortcode support for file links in HtmlEditorField 2012-03-01 22:20:58 +13:00
Ingo Schommer
9465df6fb4 MINOR Less specific button selectors in CMS JavaScript to cover <button> tags as well 2012-02-23 23:29:58 +01:00
Ingo Schommer
0bc6bffa9b BUGFIX Changed CSS class structure of GridField to avoid duplication of ".ss-gridfield" selector in different contexts, and make selectors less verbose (no more "fieldset.ss-gridfield"). Added "field" class to GridField container to ensure it displays correctly alongside other form fields (mainly around margins and paddings) 2012-02-23 23:29:58 +01:00
Ingo Schommer
8790ba3c4f BUGFIX Retain editor focus when insert images, update attributes on existing image to avoid IE bugs through TinyMCE 2012-02-22 17:53:37 +01:00
Ingo Schommer
6ffb941c28 MINOR JS formatting 2012-02-22 11:15:54 +01:00
Ingo Schommer
bb7c128025 MINOR JS syntax errors 2012-02-17 15:58:31 +01:00
Ingo Schommer
5220a46fd0 ENHANCEMENT Inserting image via new dialog with ajax field retrieval and GridField file selection. Rewritten to jQuery.entwine and using the new HTML editor abstraction layer. 2012-02-14 13:53:35 +01:00
Ingo Schommer
3866f561f5 ENHANCEMENT Using GridField for file selection in "insert image" dialog
API CHANGE Combined HTMLEditorField_Toolbar->FlashForm() and ImageForm() into new MediaForm() to handle both file types
2012-02-14 13:30:52 +01:00
Ingo Schommer
d91f76a7d0 ENHANCEMENT Created TinyMCE wrapper for link insertion dialogs in order to support other editors 2012-01-05 00:41:41 +01:00
Ingo Schommer
98852677d5 ENHANCEMENT Simplified "insert link" interface and logic by reverting to TinyMCE's standard behaviour: Only allow linking on an existing selection, don't allow modifying the link content in the "insert" interface. Now that we're presenting this interface as a dialog rather than persistent sidebar its no longer necessary to have "unselected link creation+insertion". 2012-01-05 00:41:41 +01:00
Ingo Schommer
b5c739e71d ENHANCEMENT Refactored TinyMCE LinkForm from behaviour.js to jQuery.entwine. Fixed clearing of fields when popup is closed. 2012-01-05 00:41:41 +01:00
Ingo Schommer
dc2a1205a6 MINOR Moved HTMLEditorField dialog title to jQuery UI compatible form attribute 2011-04-25 21:49:35 +12:00
Ingo Schommer
6dbfd5fdde MINOR Renaming <div id="contentPanel"> to "cms-editor-dialogs" 2011-04-24 11:46:48 +12:00
Ingo Schommer
ff29f3e4e8 ENHANCEMENT Changed HtmlEditorField link/image/flash forms to use model jQuery.dialog instead of side panel - less side effects when switching focus between editor and side panels, and fits better in new design drafts 2011-04-24 11:46:43 +12:00
Ingo Schommer
96fe7babb9 MINOR Removed debug code
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111839 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-10 05:06:01 +00:00
Ingo Schommer
73ba193ad6 ENHANCEMENT: Select the uploaded image after uploading by default. #4962 (from r97765)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102531 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 23:36:50 +00:00
Ingo Schommer
e2ca5d058d BUGFIX: Fixed CMS Editor loading in AssetAdmin (from r97638)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102521 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 23:05:43 +00:00
Ingo Schommer
afc0cd0ee7 ENHANCEMENT: CMS Editor Upload panel now loads the root files directly and allows the user to upload to the root assets dir (from r97601)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102520 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 23:05:23 +00:00
Ingo Schommer
7654557068 APICHANGE: removed SWFUpload. Refactored Content Editors uploader to use standard uploader. (from r97489)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102505 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 21:54:41 +00:00
Sean Harvey
1588da54d8 ENHANCEMENT Added support for loading external plugins (with relative paths) in HtmlEditorConfig. This means relative paths can be separate from the plugin name, and fixes a bug where paths containing dashes were ignored by TinyMCE.init().
ENHANCEMENT Changed sapphire/thirdparty/tinymce-advcode to use the original plugin name, and specify its relative path through HtmlEditorConfig instead. (from r94060)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@95582 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-12-16 05:30:46 +00:00
Normann Lou
617ad7e07c BUGFIX: the folder tinymce_advcode is changed to tinymec-advcode, so should the path
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93934 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-29 23:41:22 +00:00
Sam Minnee
9fdf9e1dc8 BUGFIX #3892: Removed reference to non-existent blockquote module in front-end tiymce.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80651 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-30 22:55:53 +00:00
Sean Harvey
cd1417a029 BUGFIX Added missing HtmlEditorField.js file from branches/2.3 that wasn't copied over during the last merge effort
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75619 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 02:52:18 +00:00