[system] / trunk / pg / macros / AppletObjects.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/AppletObjects.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 6018 Revision 6019
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: pg/macros/AppletObjects.pl,v 1.16 2009/02/07 23:08:34 gage Exp $ 4# $CVSHeader: pg/macros/AppletObjects.pl,v 1.17 2009/02/19 03:05:14 gage Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
113 # prepare html code for storing state 113 # prepare html code for storing state
114 my $appletName = $self->appletName; 114 my $appletName = $self->appletName;
115 my $appletStateName = "${appletName}_state"; 115 my $appletStateName = "${appletName}_state";
116 my $getState = $self->getStateAlias; 116 my $getState = $self->getStateAlias;
117 my $setState = $self->setStateAlias; 117 my $setState = $self->setStateAlias;
118 my $getConfig = $self->getConfigAlias;
119 my $setConfig = $self->setConfigAlias;
120
118 my $base64_initialState = $self->base64_state; 121 my $base64_initialState = $self->base64_state;
119 main::RECORD_FORM_LABEL($appletStateName); #this insures that they'll be saved from one invocation to the next 122 main::RECORD_FORM_LABEL($appletStateName); #this insures that they'll be saved from one invocation to the next
120 #main::RECORD_FORM_LABEL("previous_$appletStateName"); 123 #main::RECORD_FORM_LABEL("previous_$appletStateName");
121 my $answer_value = ''; 124 my $answer_value = '';
122 125
158 <input type="button" value="$setState" 161 <input type="button" value="$setState"
159 onClick="debugText=''; 162 onClick="debugText='';
160 ww_applet_list['$appletName'].setState(); 163 ww_applet_list['$appletName'].setState();
161 alert(debugText);" 164 alert(debugText);"
162 > 165 >
166 <input type="button" value="$getConfig"
167 onClick="debugText='';
168 ww_applet_list['$appletName'].getConfig()"; "
169 >
170 <input type="button" value="$setConfig"
171 onClick="debugText='';
172 ww_applet_list['$appletName'].config();
173 alert(debugText);"
174 >
163 !; 175 !;
176
164 my $state_input_element = ($self->debug == 1) ? $debug_input_element : 177 my $state_input_element = ($self->debug == 1) ? $debug_input_element :
165 qq!\n<input type="hidden" name = "$appletStateName" value ="$base_64_encoded_answer_value">!; 178 qq!\n<input type="hidden" name = "$appletStateName" value ="$base_64_encoded_answer_value">!;
166 my $reset_button_str = ($reset_button) ? 179 my $reset_button_str = ($reset_button) ?
167 qq!<br/><input type='button' value='set applet state to restart' onClick="setAppletStateToRestart('$appletName')"> 180 qq!<br/><input type='button' value='set applet state to restart' onClick="setAppletStateToRestart('$appletName')">
168 <input type="button" value="reinitialize applet" onClick="getQE('$appletStateName').value='$base64_initialState'"/><br/>! 181 <input type="button" value="reinitialize applet" onClick="getQE('$appletStateName').value='$base64_initialState'"/><br/>!

Legend:
Removed from v.6018  
changed lines
  Added in v.6019

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9