You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2013/09/26 14:00:27 UTC
svn commit: r1526453 - in /tcl/rivet/trunk: ChangeLog doc/xml/session.xml
rivet/packages/calendar/calendar.tcl
Author: mxmanghi
Date: Thu Sep 26 12:00:27 2013
New Revision: 1526453
URL: http://svn.apache.org/r1526453
Log:
* doc/xml/session.xml: fixed code example indentation
* rivet/packages/calendar.xml: fixed class and tag for calendar banner
Modified:
tcl/rivet/trunk/ChangeLog
tcl/rivet/trunk/doc/xml/session.xml
tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl
Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1526453&r1=1526452&r2=1526453&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Thu Sep 26 12:00:27 2013
@@ -1,3 +1,7 @@
+2013-09-26 Massimo Manghi <mx...@apache.org>
+ * doc/xml/session.xml: fixed code example indentation
+ * rivet/packages/calendar.xml: fixed class and tag for calendar banner
+
2013-09-23 Massimo Manghi <mx...@apache.org>
* rivet/packages/calendar/calendar.tcl: fixed zero length argument list
calling method emit
Modified: tcl/rivet/trunk/doc/xml/session.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/session.xml?rev=1526453&r1=1526452&r2=1526453&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml/session.xml (original)
+++ tcl/rivet/trunk/doc/xml/session.xml Thu Sep 26 12:00:27 2013
@@ -57,10 +57,8 @@
called <varname>DIO</varname> (the name of which can be
overridden). We get it by doing a</para>
- <programlisting>
- RivetServerConf ChildInitScript "package require DIO"
- RivetServerConf ChildInitScript "::DIO::handle Postgresql DIO -user www"
- </programlisting>
+ <programlisting>RivetServerConf ChildInitScript "package require DIO"
+RivetServerConf ChildInitScript "::DIO::handle Postgresql DIO -user www"</programlisting>
</section>
Modified: tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl?rev=1526453&r1=1526452&r2=1526453&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl Thu Sep 26 12:00:27 2013
@@ -54,18 +54,18 @@ package require Itcl
public variable language en
private method numberOfDays { month year }
- private method cal { month year }
+ private method cal { month year }
- protected method weekdays { }
+ protected method weekdays { }
protected method banner { mth yr }
protected method header { mth yr }
- protected method first_week { mth yr wkday }
- protected method formatDayCell { day }
- protected method openRow { wkn }
- protected method closeRow { }
+ protected method first_week { mth yr wkday }
+ protected method formatDayCell { day }
+ protected method openRow { wkn }
+ protected method closeRow { }
protected method table { mth yr }
- protected method startOutput { }
- protected method closeOutput { }
+ protected method startOutput { }
+ protected method closeOutput { }
public method cal_processed {} { return $month_year_processed }
@@ -120,9 +120,6 @@ package require Itcl
# first_week returns as many blank cells as the number of weekdays starting from Sun up to the first day of the
# month.
#
-
-
-
::itcl::body Calendar::first_week {month_idx year weekday} {
return [string repeat " " $weekday]
}
@@ -188,13 +185,14 @@ package require Itcl
# emit args:
#
# emit returns the text of the calendar. If one argument is passed
-# to this method its value is taken as a year number and the whole calendar for
-# that year is printed, thus cycling this same method for each month of the year and
-# concatenating the output in a single buffer.
-# If 2 arguments are passed emit interprets them as month and year. <month> can be
-# specified both in number (1-12) or abbreviated name (Jan,Feb,....,Dec). A minimal support
-# for other languages exists. If no arguments are passed to 'emit' the current month
-# calendar is displayed.
+# to this method its value is taken as a year number and the whole
+# calendar for that year is printed, thus cycling this same method
+# for each month of the year and concatenating the output in a single
+# buffer. If 2 arguments are passed emit interprets them as month
+# and year. <month> can be specified both in number (1-12) or
+# abbreviated name (Jan,Feb,....,Dec). A minimal support for other
+# languages exists. If no arguments are passed to 'emit' the current
+# month calendar is displayed.
#
::itcl::body Calendar::emit { args } {
@@ -318,7 +316,7 @@ package require Itcl
# for every key a 'tag' and 'attr' key is defined. attr is a even-length list storing
# attribute-value pairs
- protected variable parameters
+ public variable parameters
# we are emitting (x)html code that has to be encapsulated
# in this root element. If the value is a list the first element is
@@ -374,7 +372,7 @@ package require Itcl
foot {tag "calfoot" attr "" } \
banner {tag "monthyear" attr "" } \
banner_month {tag "month" attr "" } \
- banner_year {tag "year" attr "" } \
+ banner_year {tag "year" attr "" } \
wkdays_bar {tag "weekdays" attr "" } \
wkday_cell {tag "wkday" attr "" } \
days_row {tag "week" attr "" } \
@@ -384,7 +382,6 @@ package require Itcl
::itcl::body XmlCalendar::getParameters {param what} {
if {[dict exists $parameters $param $what]} {
-# puts "getting $param ($what) from $parameters [dict get $parameters $param $what] "
return [dict get $parameters $param $what]
} else {
return ""
@@ -464,8 +461,8 @@ package require Itcl
set year_open_tag [mkOpenTag [getParameters banner_year tag] [getParameters banner_year attr]]
set banner_html [mkOpenTag $header_tag]
- append banner_html "${month_open_tag}${month_name}[mkCloseTag [getParameters month_cell tag]]"
- append banner_html "${year_open_tag}$yr[mkCloseTag [getParameters year_cell tag]]"
+ append banner_html "${month_open_tag}${month_name}[mkCloseTag [getParameters banner_month tag]]"
+ append banner_html "${year_open_tag}$yr[mkCloseTag [getParameters banner_year tag]]"
append banner_html [mkCloseTag $header_tag]
return $banner_html
}
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org