Author: ornicar2
Date: 2010-01-19 14:01:28 +0100 (Tue, 19 Jan 2010)
New Revision: 26874
Modified:
plugins/diemPlugin/trunk/dmFrontPlugin/web/js/dmFrontCodeEditor.js
plugins/diemPlugin/trunk/dmFrontPlugin/web/js/dmFrontToolBar.js
Log:
[Diem]
- fixed front code editor style
- fixed JavaScript strict warnings
Modified: plugins/diemPlugin/trunk/dmFrontPlugin/web/js/dmFrontCodeEditor.js
===================================================================
--- plugins/diemPlugin/trunk/dmFrontPlugin/web/js/dmFrontCodeEditor.js
2010-01-19 12:09:31 UTC (rev 26873)
+++ plugins/diemPlugin/trunk/dmFrontPlugin/web/js/dmFrontCodeEditor.js
2010-01-19 13:01:28 UTC (rev 26874)
@@ -37,7 +37,7 @@
self.element.find('div#dm_code_editor_file_open ul.level2
a').click(function(e)
{
- var path = $(this).attr('href').replace(/#/, ''), url =
$.dm.ctrl.getHref('+/dmCodeEditor/file') + '?file=' + path, package =
$(this).parent().parent().parent().find('>a').text(), html = '<span title="' +
path + '">' + package + '<br />' + $(this).text() + '</span>';
+ var path = $(this).attr('href').replace(/#/, ''), url =
$.dm.ctrl.getHref('+/dmCodeEditor/file') + '?file=' + path, html = '<span
title="' + path + '">' + $(this).parent().parent().parent().find('>a').text() +
'<br />' + $(this).text() + '</span>';
self.$tabs.tabs('add', url, html);
return false;
@@ -63,15 +63,18 @@
// resize textarea
self.$dialog.trigger('resize');
+
+ setTimeout(function()
+ {
+ $panel.find('textarea').dmCodeArea({
+ save: function()
+ {
+ $panel.find('a.save').trigger('click');
+ return false;
+ }
+ });
+ }, 50);
- $panel.find('textarea').dmCodeArea({
- save: function()
- {
- $panel.find('a.save').trigger('click');
- return false;
- }
- });
-
$panel.find('a.close').click(function()
{
self.$tabs.tabs('remove', self.$tabs.tabs('option', 'selected'));
@@ -122,6 +125,8 @@
$.dm.ctrl.errorDialog('Error in '+file,
xhr.responseText);
}
});
+
+ return true;
},
updateCss: function(path)
@@ -138,7 +143,7 @@
for (var id in widgets)
{
$('#dm_widget_' + id + ' div.dm_widget_inner').html(widgets[id]);
- };
+ }
}
});
Modified: plugins/diemPlugin/trunk/dmFrontPlugin/web/js/dmFrontToolBar.js
===================================================================
--- plugins/diemPlugin/trunk/dmFrontPlugin/web/js/dmFrontToolBar.js
2010-01-19 12:09:31 UTC (rev 26873)
+++ plugins/diemPlugin/trunk/dmFrontPlugin/web/js/dmFrontToolBar.js
2010-01-19 13:01:28 UTC (rev 26874)
@@ -83,7 +83,7 @@
openCodeEditor: function(callback)
{
- var callback = callback || null;
+ callback = callback || null;
if ($dialog = $('body > div.dm_code_editor_dialog').orNot())
{
@@ -95,7 +95,8 @@
else
{
var $link = $('a.code_editor', this.element);
- $dialog = $.dm.ctrl.ajaxJsonDialog({
+
+ $dialog = $.dm.ctrl.ajaxDialog({
title: $link.attr('title'),
'class': 'dm_code_editor_dialog',
width: 500,
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.