Commit 4dc69aed authored by Gabriel Monnerat's avatar Gabriel Monnerat

2010-11-21 gabriel

* Clear the text_content field to use Spreadsheet Editor from EditorField

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40436 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent efc84c7f
...@@ -182,9 +182,7 @@ ...@@ -182,9 +182,7 @@
</item> </item>
<item> <item>
<key> <string>text_editor</string> </key> <key> <string>text_editor</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -219,107 +217,7 @@ ...@@ -219,107 +217,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string></string> </value>
<script type="text/javascript">\n
$(function() {\n
//Here is where we initiate the sheets\n
//every time sheet is created it creates a new jQuery.sheet.instance (array), to manipulate each sheet, the jQuery object is returned\n
$(\'#jQuerySheet0\').sheet({\n
title: \'Spreadsheet Playground\',\n
inlineMenu: inlineMenu($.sheet.instance),\n
urlGet: \'./getTextContent\',\n
urlSave: \'./WebTable_setTextContent\'\n
});\n
\n
//This is to give a themeswitcher on the page\n
$(\'#themeSwitcher\').themeswitcher();\n
});\n
\n
//This function builds the inline menu to make it easy to interact with each sheet instance\n
function inlineMenu(instance) {\n
var I = (instance ? instance.length : 0);\n
\n
//we want to be able to edit the html for the menu to make them multi-instance\n
var html = $(\'#inlineMenu\').html().replace(/sheetInstance/g, "$.sheet.instance[" + I + "]");\n
\n
var menu = $(html);\n
\n
//The following is just so you get an idea of how to style cells\n
menu.find(\'.colorPickerCell\')\n
.colorPicker()\n
.change(function() {\n
$.sheet.instance[I].cellUndoable.add($.sheet.instance[I].obj.cellHighlighted()); //save state, make it undoable\n
$.sheet.instance[I].obj.cellHighlighted().css(\'background-color\', $(this).val());\n
$.sheet.instance[I].cellUndoable.add($.sheet.instance[I].obj.cellHighlighted()); //save state, make it redoable\n
});\n
\n
menu.find(\'.colorPickerFont\')\n
.colorPicker()\n
.change(function() {\n
$.sheet.instance[I].cellUndoable.add($.sheet.instance[I].obj.cellHighlighted()); //save state, make it undoable\n
$.sheet.instance[I].obj.cellHighlighted().css(\'color\', $(this).val());\n
$.sheet.instance[I].cellUndoable.add($.sheet.instance[I].obj.cellHighlighted()); //save state, make it redoable\n
});\n
\n
menu.find(\'.colorPickers\')\n
.children().eq(1).css(\'background-image\', "url(\'jquery_sheet_image/palette.png\')");\n
menu.find(\'.colorPickers\')\n
.children().eq(3).css(\'background-image\', "url(\'jquery_sheet_image/palette_bg.png\')");\n
\n
\n
return menu;\n
}\n
\n
function goToObj(s) {\n
$(\'html, body\').animate({\n
scrollTop: $(s).offset().top\n
}, \'slow\');\n
return false;\n
}\n
</script>\n
\n
\n
<div id="jQuerySheet0" style="height: 400px;"></div>\n
<span id="themeSwitcher"></span>\n
\n
<span id="inlineMenu" style="display: none;">\n
<span>\n
<a href="#" onclick="sheetInstance.controlFactory.addRow(); return false;" title="Insert Row After Selected"><img alt="Insert Row After Selected" src="jquery_sheet_image/sheet_row_add.png"/></a>\n
<a href="#" onclick="sheetInstance.controlFactory.addRow(null, true); return false;" title="Insert Row Before Selected"><img alt="Insert Row Before Selected" src="jquery_sheet_image/sheet_row_add.png"/></a>\n
<a href="#" onclick="sheetInstance.controlFactory.addRow(null, null, \':last\'); return false;" title="Add Row At End"><img alt="Add Row" src="jquery_sheet_image/sheet_row_add.png"/></a>\n
<a href="#" onclick="sheetInstance.controlFactory.addRowMulti(); return false;" title="Add Multi-Rows"><img alt="Add Multi-Rows" src="jquery_sheet_image/sheet_row_add_multi.png"/></a>\n
<a href="#" onclick="sheetInstance.deleteRow(); return false;" title="Delete Row"><img alt="Delete Row" src="jquery_sheet_image/sheet_row_delete.png"/></a>\n
<a href="#" onclick="sheetInstance.controlFactory.addColumn(); return false;" title="Insert Column After Selected"><img alt="Insert Column After Selected" src="jquery_sheet_image/sheet_col_add.png"/></a>\n
<a href="#" onclick="sheetInstance.controlFactory.addColumn(null, true); return false;" title="Insert Column Before Selected"><img alt="Insert Column Before Selected" src="jquery_sheet_image/sheet_col_add.png"/></a>\n
<a href="#" onclick="sheetInstance.controlFactory.addColumn(null, null, \':last\'); return false;" title="Add Column At End"><img alt="Add Column At End" src="jquery_sheet_image/sheet_col_add.png"/></a>\n
<a href="#" onclick="sheetInstance.controlFactory.addColumnMulti(); return false;" title="Insert Multi-Columns"><img alt="Add Multi-Columns" src="jquery_sheet_image/sheet_col_add_multi.png"/></a>\n
<a href="#" onclick="sheetInstance.deleteColumn(); return false;" title="Delete Column"><img alt="Delete Column" src="jquery_sheet_image/sheet_col_delete.png"/></a>\n
<a href="#" onclick="sheetInstance.getTdRange(null, sheetInstance.obj.formula().val()); return false;" title="Get Cell Range"><img alt="Get Cell Range" src="jquery_sheet_image/sheet_get_range.png"/></a>\n
<a href="#" onclick="sheetInstance.s.fnSave(); return false;" title="Save Sheets"><img alt="Save Sheet" src="jquery_sheet_image/disk.png"/></a>\n
<a href="#" onclick="sheetInstance.deleteSheet(); return false;" title="Delete Current Sheet"><img alt="Delete Current Sheet" src="jquery_sheet_image/table_delete.png"/></a>\n
<a href="#" onclick="sheetInstance.calc(sheetInstance.i); return false;" title="Refresh Calculations"><img alt="Refresh Calculations" src="jquery_sheet_image/arrow_refresh.png"/></a>\n
<a href="#" onclick="sheetInstance.cellFind(); return false;" title="Find"><img alt="Find" src="jquery_sheet_image/find.png"/></a>\n
<a href="#" onclick="sheetInstance.cellStyleToggle(\'styleBold\'); return false;" title="Bold"><img alt="Bold" src="jquery_sheet_image/text_bold.png"/></a>\n
<a href="#" onclick="sheetInstance.cellStyleToggle(\'styleItalics\'); return false;" title="Italic"><img alt="Italic" src="jquery_sheet_image/text_italic.png"/></a>\n
<a href="#" onclick="sheetInstance.cellStyleToggle(\'styleUnderline\', \'styleLineThrough\'); return false;" title="Underline"><img alt="Underline" src="jquery_sheet_image/text_underline.png"/></a>\n
<a href="#" onclick="sheetInstance.cellStyleToggle(\'styleLineThrough\', \'styleUnderline\'); return false;" title="Strikethrough"><img alt="Strikethrough" src="jquery_sheet_image/text_strikethrough.png"/></a>\n
<a href="#" onclick="sheetInstance.cellStyleToggle(\'styleLeft\', \'styleCenter styleRight\'); return false;" title="Align Left"><img alt="Align Left" src="jquery_sheet_image/text_align_left.png"/></a>\n
<a href="#" onclick="sheetInstance.cellStyleToggle(\'styleCenter\', \'styleLeft styleRight\'); return false;" title="Align Center"><img alt="Align Center" src="jquery_sheet_image/text_align_center.png"/></a>\n
<a href="#" onclick="sheetInstance.cellStyleToggle(\'styleRight\', \'styleLeft styleCenter\'); return false;" title="Align Right"><img alt="Align Right" src="jquery_sheet_image/text_align_right.png"/></a>\n
<a href="#" onclick="sheetInstance.fillUpOrDown(); return false;" title="Fill Down"><img alt="Fill Down" src="jquery_sheet_image/arrow_down.png"/></a>\n
<a href="#" onclick="sheetInstance.fillUpOrDown(true); return false;" title="Fill Up"><img alt="Fill Up" src="jquery_sheet_image/arrow_up.png"/></a>\n
<span class="colorPickers">\n
<input title="Foreground color" class="colorPickerFont" style="background-image: url(\'jquery_sheet_image/palette.png\') ! important; width: 16px; height: 16px;" />\n
<input title="Background Color" class="colorPickerCell" style="background-image: url(\'jquery_sheet_image/palette_bg.png\') ! important; width: 16px; height: 16px;" />\n
</span>\n
<a href="#" onclick="sheetInstance.obj.formula().val(\'=HYPERLINK(\\\'\' + prompt(\'Enter Web Address\', \'http://www.visop-dev.com/\') + \'\\\')\').keydown(); return false;" title="HyperLink"><img alt="Web Link" src="jquery_sheet_image/page_link.png"/></a>\n
<a href="#" onclick="sheetInstance.toggleFullScreen(); $(\'#lockedMenu\').toggle(); return false;" title="Toggle Full Screen"><img alt="Web Link" src="jquery_sheet_image/arrow_out.png"/></a>\n
<!--<a href="#" onclick="insertAt(\'jSheetControls_formula\', \'~np~text~\'+\'/np~\');return false;" title="Non-parsed"><img alt="Non-parsed" src="jquery_sheet_image/noparse.png"/></a>-->\n
</span>\n
</span>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -327,7 +225,7 @@ return false;\n ...@@ -327,7 +225,7 @@ return false;\n
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -367,7 +265,7 @@ return false;\n ...@@ -367,7 +265,7 @@ return false;\n
</item> </item>
<item> <item>
<key> <string>text_editor</string> </key> <key> <string>text_editor</string> </key>
<value> <string>text_area</string> </value> <value> <string>spreadsheet_editor</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -391,17 +289,4 @@ return false;\n ...@@ -391,17 +289,4 @@ return false;\n
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/Base_getEditorFieldPreferredTextEditor</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
2010-11-21 gabriel
* Clear the text_content field to use Spreadsheet Editor from EditorField
2010-11-10 gabriel 2010-11-10 gabriel
* Added svg_editor_support page template. This page template will be used to integrate svg editor with EditorField. * Added svg_editor_support page template. This page template will be used to integrate svg editor with EditorField.
......
13 14
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment