Changeset 3456
- Timestamp:
- 04/16/09 10:19:19 (3 years ago)
- Location:
- trunk/EditTablePlugin
- Files:
-
- 3 edited
-
data/System/EditTablePlugin.txt (modified) (3 diffs)
-
lib/Foswiki/Plugins/EditTablePlugin.pm (modified) (3 diffs)
-
lib/Foswiki/Plugins/EditTablePlugin/Core.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/EditTablePlugin/data/System/EditTablePlugin.txt
r3416 r3456 2 2 ---+!! Edit Table Plugin 3 3 4 Edit tables in place, using edit fields and drop down boxes, without having to edit the complete topic. 4 %SHORTDESCRIPTION% 5 5 6 6 Simply add an *[ Edit table ]* button to an existing table by writing =%<nop>EDITTABLE{}%= directly above the table. This can be added to tables that are formatted with TablePlugin: add the =EDITTABLE= macro just above or below the =TABLE= tag. It can also be used without any =TABLE= tag. … … 149 149 ---++ Plugin Settings 150 150 151 Plugin settings are stored as [[%SYSTEMWEB%.PreferenceSettings][preference settings]]. To reference 152 a plugin setting write ==%<nop><plugin>_<setting>%==, for example, ==%<nop>EDITTABLEPLUGIN_SHORTDESCRIPTION%== 153 154 * One line description, shown in the %SYSTEMWEB%.TextFormattingRules topic: 151 You can override the default settings for the plugin by defining the following [[%SYSTEMWEB%.PreferenceSettings][preferences]]. 152 <!-- 155 153 * Set SHORTDESCRIPTION = Edit tables using edit fields, date pickers and drop down boxes 156 157 * Set DEBUG to 1 to get debug messages in =data/debug.txt=. Default: =0= 158 * Set DEBUG = 0 159 160 * Set JAVASCRIPTINTERFACE to 1 to be able to directly move and delete row without page refresh. Can be overridden with parameter =javascriptinterface=. 161 * Set JAVASCRIPTINTERFACE = 1 162 163 * Default for change rows flag: =on=, =off=, =add= 164 * Set CHANGEROWS = on 165 166 * Default flag for quiet save option: =on= to show the Quiet Save button, =off= to hide 167 * Set QUIETSAVE = on 168 169 * Default edit button: Specify =button text=, or specify =alternate text, image URL=. Note: Texts inside =%<nop>MAKETEXT{}%= are translated into other languages. 170 * #Set EDIT_BUTTON = %MAKETEXT{"Edit table"}% 171 * Set EDIT_BUTTON = %MAKETEXT{"Edit this table"}%, %ATTACHURL%/edittable.gif 172 * Set SAVE_BUTTON = %MAKETEXT{"Save table"}% 173 * Set QUIET_SAVE_BUTTON = %MAKETEXT{"Quiet save"}% 174 * Set ADD_ROW_BUTTON = %MAKETEXT{"Add row"}% 175 * Set DELETE_LAST_ROW_BUTTON = %MAKETEXT{"Delete last row"}% 176 * Set CANCEL_BUTTON = %MAKETEXT{"Cancel"}% 177 178 * Default help texts 179 * Set INCLUDED_TOPIC_DOES_NOT_EXIST = <span class="foswikiAlert">%MAKETEXT{"Warning: 'include' topic does not exist!"}%</span> 154 --> 155 Note: Texts inside =%<nop>MAKETEXT{}%= are translated into other languages. 156 | *Preference* | *Meaning* | *Default* | 157 | EDITTABLEPLUGIN_JAVASCRIPTINTERFACE | Set to 0 to be disable the ability to directly move and delete row without page refresh. Can be overridden with parameter =javascriptinterface= | 1 | 158 | EDITTABLEPLUGIN_CHANGEROWS | Default for change rows flag: =on=, =off=, =add= | on | 159 | EDITTABLEPLUGIN_QUIETSAVE | Default flag for quiet save option: =on= to show the Quiet Save button, =off= to hide | on | 160 | EDITTABLEPLUGIN_EDIT_BUTTON | Specify =button text=, or =alternate text, image URL=. | %MAKETEXT{"Edit this table"}%, %ATTACHURL%/edittable.gif | 161 | EDITTABLEPLUGIN_SAVE_BUTTON | Specify =button text=, or =alternate text, image URL=. | %MAKETEXT{"Save table"}% | 162 | EDITTABLEPLUGIN_QUIET_SAVE_BUTTON | Specify =button text=, or =alternate text, image URL=. | %MAKETEXT{"Quiet save"}% | 163 | EDITTABLEPLUGIN_ADD_ROW_BUTTON | Specify =button text=, or =alternate text, image URL=. | %MAKETEXT{"Add row"}% | 164 | EDITTABLEPLUGIN_DELETE_LAST_ROW_BUTTON | Specify =button text=, or =alternate text, image URL=. | %MAKETEXT{"Delete last row"}% | 165 | EDITTABLEPLUGIN_CANCEL_BUTTON | Specify =button text=, or =alternate text, image URL=. | %MAKETEXT{"Cancel"}% | 166 | EDITTABLEPLUGIN_INCLUDED_TOPIC_DOES_NOT_EXIST | Default help texts | <span class="foswikiAlert">%MAKETEXT{"Warning: 'include' topic does not exist!"}%</span> | 180 167 181 168 *Note:* The Plugin uses base settings like date format, language and style from the JSCalendarContrib. … … 192 179 193 180 ---++ Installation Instructions 194 Normally this plugin is distributed and automatically installed with Foswiki. The instructions below are meant for special installations. 195 196 1 Download the ZIP file from the Plugin web (see below) 197 1 Unzip ==%TOPIC%.zip== in your ($FOSWIKI_ROOT) directory. 198 * Alternatively, manually resolve the dependencies listed below. 199 %$DEPENDENCIES% 200 1 The Plugin depends on the =viewauth= script to authenticate the user. As described in %SYSTEMWEB%.AccessControl, copy the =view= script to =viewauth= (or better, create a symbolic link) and add =viewauth= to the list of authenticated scripts in the =.htaccess= file. 201 1 Visit =configure= in your installation, and enable the plugin in the ={Plugins}= section. 202 181 %$INSTALL_INSTRUCTIONS% 203 182 Test if the Plugin is correctly installed: 204 183 * Check above example if there is an *[ Edit table ]* button below the table in above example -
trunk/EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin.pm
r3283 r3456 23 23 use strict; 24 24 25 # This should always be $Rev$ so that Foswiki can determine the checked-in26 # status of the plugin. It is used by the build automation tools, so27 # you should leave it alone.28 25 our $VERSION = '$Rev$'; 29 30 # This is a free-form string you can use to "name" your own plugin version.31 # It is *not* used by the build automation tools, but is reported as part32 # of the version number in PLUGINDESCRIPTIONS.33 26 our $RELEASE = '4.21'; 34 27 … … 37 30 our $ENCODE_END = '--EditTableEncodeEnd--'; 38 31 our $ASSET_URL = '%PUBURL%/%SYSTEMWEB%/EditTablePlugin'; 32 our $NO_PREFS_IN_TOPIC = 1; 33 our $SHORTDESCRIPTION = 'Edit tables using edit fields, date pickers and drop down boxes'; 39 34 our $web; 40 35 our $topic; … … 64 59 $debug = Foswiki::Func::getPreferencesFlag('EDITTABLEPLUGIN_DEBUG'); 65 60 $usesJavascriptInterface = 66 Foswiki::Func::getPreferencesFlag('EDITTABLEPLUGIN_JAVASCRIPTINTERFACE'); 61 Foswiki::Func::getPreferencesFlag('EDITTABLEPLUGIN_JAVASCRIPTINTERFACE') 62 || 1; 67 63 $viewModeHeaderDone = 0; 68 64 $editModeHeaderDone = 0; -
trunk/EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin/Core.pm
r3283 r3456 624 624 $prefEDIT_BUTTON = 625 625 Foswiki::Func::getPreferencesValue("\U$pluginName\E_EDIT_BUTTON") 626 || 'Edit table';626 || '%MAKETEXT{"Edit this table"}%, %ATTACHURL%/edittable.gif'; 627 627 628 628 $prefSAVE_BUTTON = 629 629 Foswiki::Func::getPreferencesValue("\U$pluginName\E_SAVE_BUTTON") 630 || ' Save table';630 || '%MAKETEXT{"Save table"}%'; 631 631 632 632 $prefQUIET_SAVE_BUTTON = 633 633 Foswiki::Func::getPreferencesValue("\U$pluginName\E_QUIET_SAVE_BUTTON") 634 || ' Quiet save';634 || '%MAKETEXT{"Quiet save"}%'; 635 635 636 636 $prefADD_ROW_BUTTON = 637 637 Foswiki::Func::getPreferencesValue("\U$pluginName\E_ADD_ROW_BUTTON") 638 || ' Add row';638 || '%MAKETEXT{"Add row"}%'; 639 639 640 640 $prefDELETE_LAST_ROW_BUTTON = Foswiki::Func::getPreferencesValue( 641 641 "\U$pluginName\E_DELETE_LAST_ROW_BUTTON") 642 || ' Delete last row';642 || '%MAKETEXT{"Delete last row"}%'; 643 643 644 644 $prefCANCEL_BUTTON = 645 645 Foswiki::Func::getPreferencesValue("\U$pluginName\E_CANCEL_BUTTON") 646 || ' Cancel';646 || '%MAKETEXT{"Cancel"}%'; 647 647 648 648 $prefMESSAGE_INCLUDED_TOPIC_DOES_NOT_EXIST = 649 649 Foswiki::Func::getPreferencesValue( 650 650 "\U$pluginName\E_INCLUDED_TOPIC_DOES_NOT_EXIST") 651 || ' Warning: \'include\' topic does not exist!';651 || '<span class="foswikiAlert">%MAKETEXT{"Warning: \'include\' topic does not exist!"}%</span>'; 652 652 } 653 653
Note: See TracChangeset
for help on using the changeset viewer.
