Changeset 3456


Ignore:
Timestamp:
04/16/09 10:19:19 (3 years ago)
Author:
CrawfordCurrie
Message:

Item1383: removed support for settings in the plugin topic

Location:
trunk/EditTablePlugin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/EditTablePlugin/data/System/EditTablePlugin.txt

    r3416 r3456  
    22---+!! Edit Table Plugin 
    33 
    4 Edit tables in place, using edit fields and drop down boxes, without having to edit the complete topic.  
     4%SHORTDESCRIPTION% 
    55 
    66Simply add an *[&nbsp;Edit&nbsp;table&nbsp;]* 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. 
     
    149149---++ Plugin Settings 
    150150 
    151 Plugin settings are stored as [[%SYSTEMWEB%.PreferenceSettings][preference settings]]. To reference 
    152 a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, for example, ==%<nop>EDITTABLEPLUGIN_SHORTDESCRIPTION%== 
    153  
    154    * One line description, shown in the %SYSTEMWEB%.TextFormattingRules topic: 
     151You can override the default settings for the plugin by defining the following [[%SYSTEMWEB%.PreferenceSettings][preferences]]. 
     152<!-- 
    155153      * 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--> 
     155Note: 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> | 
    180167    
    181168*Note:* The Plugin uses base settings like date format, language and style from the JSCalendarContrib. 
     
    192179 
    193180---++ 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% 
    203182Test if the Plugin is correctly installed: 
    204183   * Check above example if there is an *[&nbsp;Edit&nbsp;table&nbsp;]* button below the table in above example 
  • trunk/EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin.pm

    r3283 r3456  
    2323use strict; 
    2424 
    25 # This should always be $Rev$ so that Foswiki can determine the checked-in 
    26 # status of the plugin. It is used by the build automation tools, so 
    27 # you should leave it alone. 
    2825our $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 part 
    32 # of the version number in PLUGINDESCRIPTIONS. 
    3326our $RELEASE = '4.21'; 
    3427 
     
    3730our $ENCODE_END   = '--EditTableEncodeEnd--'; 
    3831our $ASSET_URL    = '%PUBURL%/%SYSTEMWEB%/EditTablePlugin'; 
     32our $NO_PREFS_IN_TOPIC = 1; 
     33our $SHORTDESCRIPTION = 'Edit tables using edit fields, date pickers and drop down boxes'; 
    3934our $web; 
    4035our $topic; 
     
    6459    $debug = Foswiki::Func::getPreferencesFlag('EDITTABLEPLUGIN_DEBUG'); 
    6560    $usesJavascriptInterface = 
    66       Foswiki::Func::getPreferencesFlag('EDITTABLEPLUGIN_JAVASCRIPTINTERFACE'); 
     61      Foswiki::Func::getPreferencesFlag('EDITTABLEPLUGIN_JAVASCRIPTINTERFACE') 
     62          || 1; 
    6763    $viewModeHeaderDone = 0; 
    6864    $editModeHeaderDone = 0; 
  • trunk/EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin/Core.pm

    r3283 r3456  
    624624    $prefEDIT_BUTTON = 
    625625      Foswiki::Func::getPreferencesValue("\U$pluginName\E_EDIT_BUTTON") 
    626       || 'Edit table'; 
     626      ||  '%MAKETEXT{"Edit this table"}%, %ATTACHURL%/edittable.gif'; 
    627627 
    628628    $prefSAVE_BUTTON = 
    629629      Foswiki::Func::getPreferencesValue("\U$pluginName\E_SAVE_BUTTON") 
    630       || 'Save table'; 
     630      || '%MAKETEXT{"Save table"}%'; 
    631631 
    632632    $prefQUIET_SAVE_BUTTON = 
    633633      Foswiki::Func::getPreferencesValue("\U$pluginName\E_QUIET_SAVE_BUTTON") 
    634       || 'Quiet save'; 
     634      || '%MAKETEXT{"Quiet save"}%'; 
    635635 
    636636    $prefADD_ROW_BUTTON = 
    637637      Foswiki::Func::getPreferencesValue("\U$pluginName\E_ADD_ROW_BUTTON") 
    638       || 'Add row'; 
     638      || '%MAKETEXT{"Add row"}%'; 
    639639 
    640640    $prefDELETE_LAST_ROW_BUTTON = Foswiki::Func::getPreferencesValue( 
    641641        "\U$pluginName\E_DELETE_LAST_ROW_BUTTON") 
    642       || 'Delete last row'; 
     642      || '%MAKETEXT{"Delete last row"}%'; 
    643643       
    644644    $prefCANCEL_BUTTON = 
    645645      Foswiki::Func::getPreferencesValue("\U$pluginName\E_CANCEL_BUTTON") 
    646       || 'Cancel'; 
     646      || '%MAKETEXT{"Cancel"}%'; 
    647647       
    648648    $prefMESSAGE_INCLUDED_TOPIC_DOES_NOT_EXIST = 
    649649      Foswiki::Func::getPreferencesValue( 
    650650        "\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>'; 
    652652} 
    653653 
Note: See TracChangeset for help on using the changeset viewer.