[Logilogi-svn] SF.net SVN: logilogi:[1714] trunk
Status: Beta
Brought to you by:
wybow
|
From: <wy...@us...> - 2010-03-24 10:51:30
|
Revision: 1714
http://logilogi.svn.sourceforge.net/logilogi/?rev=1714&view=rev
Author: wybow
Date: 2010-03-24 10:51:20 +0000 (Wed, 24 Mar 2010)
Log Message:
-----------
Applied some improvements in response to first usability study + dbr
fixes
Modified Paths:
--------------
trunk/app/helpers/application_helper.rb
trunk/app/models/user.rb
trunk/app/views/layouts/_head.html.erb
trunk/app/views/user_sessions/_method.html.erb
trunk/app/views/users/_method.html.erb
trunk/config/locales/en.yml
trunk/db/schema.rb
trunk/public/images/primarytabs_background_left.png
trunk/public/images/primarytabs_background_right.png
trunk/public/images/secondary_tabs_background_left.png
trunk/public/images/secondary_tabs_background_right.png
trunk/public/javascripts/application.js
Added Paths:
-----------
trunk/db/migrate/20100324102758_global_config_add_custom_js.rb
trunk/public/images/primarytabs_background_left.svg
trunk/public/images/primarytabs_background_right.svg
trunk/public/images/secondary_tabs_background_left.svg
trunk/public/images/secondary_tabs_background_right.svg
trunk/public/javascripts/dbr.js
Modified: trunk/app/helpers/application_helper.rb
===================================================================
--- trunk/app/helpers/application_helper.rb 2010-03-11 16:31:08 UTC (rev 1713)
+++ trunk/app/helpers/application_helper.rb 2010-03-24 10:51:20 UTC (rev 1714)
@@ -14,6 +14,13 @@
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
+
+ # OFFLINE For offline demoing
+ #
+# def gravatar_for(bogus, options = {})
+# "<img class=\"#{options[:class]}\" alt=\"#{options[:alt]}\" width=\"#{options[:size]}\" height=\"#{options[:size]}\" src=\"/images/user_default_avatar.png\" />"
+# end
+
### Javascript compression
def compressed_javascript_include_tag(*sources)
Modified: trunk/app/models/user.rb
===================================================================
--- trunk/app/models/user.rb 2010-03-11 16:31:08 UTC (rev 1713)
+++ trunk/app/models/user.rb 2010-03-24 10:51:20 UTC (rev 1714)
@@ -69,7 +69,7 @@
# more in HomePageModule
validates_presence_of :name
validates_uniqueness_of :name
- validates_format_of :name, :with => /^([^a-z]|[A-Z]).*$/,
+ validates_format_of :name, :with => /^(.*\s|)([^a-z]|[A-Z]).*$/,
:message => t('m.user.error_capital_letter')
# make strict when Unicode is supported
validates_format_of :name, :with => /^[\w\ _.-]+$/,
Modified: trunk/app/views/layouts/_head.html.erb
===================================================================
--- trunk/app/views/layouts/_head.html.erb 2010-03-11 16:31:08 UTC (rev 1713)
+++ trunk/app/views/layouts/_head.html.erb 2010-03-24 10:51:20 UTC (rev 1714)
@@ -12,9 +12,15 @@
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<!-- TinyMCE is included on edits -->
<%= javascript_include_tag "tiny_mce/tiny_mce" %>
- <%= javascript_include_tag "shortcut", :defaults, "dropdowntabs", "taglist",
- "body_inserter", "magick_corners", "custom-form-elements", "tab",
- :cache => true %>
+ <%
+ javascripts = ["shortcut", :defaults, "dropdowntabs", "taglist",
+ "body_inserter", "magick_corners", "custom-form-elements", "tab"]
+ if GlobalConfig.custom_js and !GlobalConfig.custom_js.empty?
+ javascripts.push(GlobalConfig.custom_js)
+ end
+ javascripts.push(:cache => true)
+ %>
+ <%= javascript_include_tag *javascripts %>
<%= stylesheet_link_tag "logilogi" %>
<!--[if IE]>
<%= stylesheet_link_tag "ie" %>
Modified: trunk/app/views/user_sessions/_method.html.erb
===================================================================
--- trunk/app/views/user_sessions/_method.html.erb 2010-03-11 16:31:08 UTC (rev 1713)
+++ trunk/app/views/user_sessions/_method.html.erb 2010-03-24 10:51:20 UTC (rev 1714)
@@ -7,10 +7,6 @@
:description => t('v.user_sessions.login_with_openid')}],
:selected => selected, :id => "method", :update_selected => true} do %>
- <% if selected == "normal" %>
- <p><%= t('v.user_sessions.forgot_reset') + ' ' +
- link_to(t('defaults.click_here'), new_password_reset_path) %></p>
- <% end %>
<% form_for(@user_session, :url => user_session_path()) do |form| %>
<% if selected == "normal" %>
@@ -18,6 +14,8 @@
:label => t('defaults.email_label'), :tabindex => 1 %>
<%= form.password_field :password,
:label => t('defaults.password_label'), :tabindex => 2 %>
+ <p><%= t('v.user_sessions.forgot_reset') + ' ' +
+ link_to(t('defaults.click_here'), new_password_reset_path) %></p>
<% else %>
<%= form.text_field :openid_identifier,
:label => t('defaults.openid_label'), :tabindex => 1 %>
@@ -32,5 +30,10 @@
<% end %>
<% javascript_tag do -%>
mcorners.run();
+ <% if selected == "normal" %>
+ enterSubmit('user_session_password','new_user_session');
+ <% else %>
+ enterSubmit('user_session_openid_identifier','new_user_session');
+ <% end %>
<% end -%>
</div>
Modified: trunk/app/views/users/_method.html.erb
===================================================================
--- trunk/app/views/users/_method.html.erb 2010-03-11 16:31:08 UTC (rev 1713)
+++ trunk/app/views/users/_method.html.erb 2010-03-24 10:51:20 UTC (rev 1714)
@@ -16,7 +16,7 @@
</p>
<% end %>
- <% form_for(@user, :html => {:id => "new_form"}) do |form| %>
+ <% form_for(@user) do |form| %>
<%= form.text_field 'name', :label => t('v.users.full_name_label'), :tabindex => 1 %>
<%= form.text_field 'email', :label => t('v.users.email_label'), :tabindex => 2 %>
<% if selected == "normal" %>
@@ -36,5 +36,11 @@
<% end %>
<% javascript_tag do -%>
mcorners.run();
+ <% if selected == "normal" %>
+ enterSubmit('user_password','new_user');
+ enterSubmit('user_password_confirmation','new_user');
+ <% else %>
+ enterSubmit('user_openid_identifier','new_user');
+ <% end %>
<% end -%>
</div>
Modified: trunk/config/locales/en.yml
===================================================================
--- trunk/config/locales/en.yml 2010-03-11 16:31:08 UTC (rev 1713)
+++ trunk/config/locales/en.yml 2010-03-24 10:51:20 UTC (rev 1714)
@@ -652,7 +652,7 @@
perma_link_tab: "Specific logi"
right_text: "Is it the right phrase?"
select_insert: "Select what you want to attach; a new logi, various types of links, or a remark."
- select_range: "Select the range of text to which you want to attach it."
+ select_range: "Select the range of text to which you want it to be attached."
select_remove: "Select what you want to detach; links to logis, external links, or remarks."
selected_label: "Selected phrase:"
submit_and_attach: "Submit and attach more"
@@ -818,7 +818,7 @@
new_password: "New password"
reset_my_password: "Reset my password"
reset_your: "Reset your password"
- update: "Update and log in."
+ update: "Update and log in"
your_email: "Your email"
peer_group_admin_memberships:
can_create_here: "You can create a peergroup here."
Added: trunk/db/migrate/20100324102758_global_config_add_custom_js.rb
===================================================================
--- trunk/db/migrate/20100324102758_global_config_add_custom_js.rb (rev 0)
+++ trunk/db/migrate/20100324102758_global_config_add_custom_js.rb 2010-03-24 10:51:20 UTC (rev 1714)
@@ -0,0 +1,9 @@
+class GlobalConfigAddCustomJs < ActiveRecord::Migration
+ def self.up
+ add_column :global_configs, :custom_js, :string
+ end
+
+ def self.down
+ remove_column :global_configs, :custom_js
+ end
+end
Modified: trunk/db/schema.rb
===================================================================
--- trunk/db/schema.rb 2010-03-11 16:31:08 UTC (rev 1713)
+++ trunk/db/schema.rb 2010-03-24 10:51:20 UTC (rev 1714)
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20100309223143) do
+ActiveRecord::Schema.define(:version => 20100324102758) do
create_table "acts_as_xapian_jobs", :force => true do |t|
t.string "model", :null => false
@@ -100,6 +100,7 @@
t.string "custom_css"
t.string "footer_partial", :null => false
t.integer "maximum_message_size", :null => false
+ t.string "custom_js"
end
create_table "invitations", :force => true do |t|
Modified: trunk/public/images/primarytabs_background_left.png
===================================================================
(Binary files differ)
Added: trunk/public/images/primarytabs_background_left.svg
===================================================================
--- trunk/public/images/primarytabs_background_left.svg (rev 0)
+++ trunk/public/images/primarytabs_background_left.svg 2010-03-24 10:51:20 UTC (rev 1714)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg4040"
+ version="1.1"
+ inkscape:version="0.47pre4 r22446"
+ width="15"
+ height="300"
+ sodipodi:docname="primarytabs_background_left.svg"
+ inkscape:export-filename="/home/wybo/logilogi/trunk/public/images/primarytabs_background_left.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <metadata
+ id="metadata4046">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs4044">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ id="perspective4048" />
+ </defs>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1366"
+ inkscape:window-height="719"
+ id="namedview4042"
+ showgrid="false"
+ inkscape:zoom="2.2250293"
+ inkscape:cx="7.5"
+ inkscape:cy="122.44057"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4040"
+ showguides="true"
+ inkscape:guide-bbox="true" />
+ <path
+ style="fill:#000000"
+ d=""
+ id="path4052" />
+ <path
+ style="fill:#999dd7;fill-opacity:1;stroke:#999dd7;stroke-opacity:1;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none"
+ d="m 15,1 8.673729,0 c 7.756,0 14,6.1607472 14,13.813334 l 0,120.373336 c 0,7.65258 -6.244,13.81333 -14,13.81333 L 15,149 c -7.756,0 -14,0 -14,0 L 1,14.813334 C 1,7.1607472 7.244,1 15,1 z"
+ id="rect4054"
+ sodipodi:nodetypes="ccccccccc" />
+ <path
+ sodipodi:nodetypes="ccccccccc"
+ id="path4855"
+ d="m 15,151 8.673729,0 c 7.756,0 14,6.16075 14,13.81333 l 0,120.37334 c 0,7.65258 -6.244,13.81333 -14,13.81333 L 15,299 c -7.756,0 -14,0 -14,0 L 1,164.81333 C 1,157.16075 7.244,151 15,151 z"
+ style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+</svg>
Modified: trunk/public/images/primarytabs_background_right.png
===================================================================
(Binary files differ)
Added: trunk/public/images/primarytabs_background_right.svg
===================================================================
--- trunk/public/images/primarytabs_background_right.svg (rev 0)
+++ trunk/public/images/primarytabs_background_right.svg 2010-03-24 10:51:20 UTC (rev 1714)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg4917"
+ version="1.1"
+ inkscape:version="0.47pre4 r22446"
+ width="400"
+ height="300"
+ sodipodi:docname="primarytabs_background_right.svg"
+ inkscape:export-filename="/home/wybo/logilogi/trunk/public/images/primarytabs_background_right.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <metadata
+ id="metadata4923">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs4921">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ id="perspective4925" />
+ </defs>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1366"
+ inkscape:window-height="719"
+ id="namedview4919"
+ showgrid="true"
+ inkscape:snap-grids="true"
+ inkscape:snap-to-guides="true"
+ inkscape:zoom="2.2250293"
+ inkscape:cx="200"
+ inkscape:cy="130.88526"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4917" />
+ <path
+ style="fill:#999dd7;fill-opacity:1;stroke:#999dd7;stroke-width:2.00840187000000014;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 14.981204,1.004207 370.037606,0 c 7.74326,0 13.977,6.222839 13.977,13.952553 l 0,134.04324 c 0,0 -6.23374,-0.004 -13.977,-0.004 l -370.037606,0 C 7.2379443,148.9958 1.004,149 1.004,149 L 1.0042009,14.95676 c 0,-7.729714 6.2337434,-13.952553 13.9770031,-13.952553 z"
+ id="rect4929"
+ sodipodi:nodetypes="ccccccccc" />
+ <path
+ sodipodi:nodetypes="ccccccccc"
+ id="path4934"
+ d="m 14.981191,151.00419 370.037629,0 c 7.74326,0 13.977,6.22266 13.977,13.95216 l 0,134.03946 c 0,0 -6.23374,-0.004 -13.977,-0.004 l -370.037629,0 c -7.7432603,-2e-4 -13.9772051,0.004 -13.9772051,0.004 l 2.009e-4,-134.03946 c 0,-7.7295 6.2337439,-13.95216 13.9770042,-13.95216 z"
+ style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:2.00837374000000013;stroke-miterlimit:4;stroke-opacity:1"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+</svg>
Modified: trunk/public/images/secondary_tabs_background_left.png
===================================================================
(Binary files differ)
Added: trunk/public/images/secondary_tabs_background_left.svg
===================================================================
--- trunk/public/images/secondary_tabs_background_left.svg (rev 0)
+++ trunk/public/images/secondary_tabs_background_left.svg 2010-03-24 10:51:20 UTC (rev 1714)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg6241"
+ version="1.1"
+ inkscape:version="0.47pre4 r22446"
+ width="15"
+ height="300"
+ sodipodi:docname="secondary_tabs_background_left.svg"
+ inkscape:export-filename="/home/wybo/logilogi/trunk/public/images/secondary_tabs_background_left.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <metadata
+ id="metadata6247">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs6245">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ id="perspective6249" />
+ <inkscape:perspective
+ id="perspective6261"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1366"
+ inkscape:window-height="719"
+ id="namedview6243"
+ showgrid="false"
+ inkscape:zoom="2.2250293"
+ inkscape:cx="7.5"
+ inkscape:cy="194.45336"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg6241" />
+ <path
+ style="fill:#999dd7;fill-opacity:1;stroke:#30367e;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 15,1.0000009 8.673729,0 c 7.756002,0 14.000002,6.16075 14.000002,13.8133401 l 0,120.373329 c 0,7.65258 -6.244,13.81333 -14.000002,13.81333 L 15,149 c -7.756,0 -14,0 -14,0 L 1,14.813341 C 1,7.1607509 7.244,1.0000009 15,1.0000009 z"
+ id="rect4054"
+ sodipodi:nodetypes="ccccccccc" />
+ <path
+ sodipodi:nodetypes="ccccccccc"
+ id="path6275"
+ d="m 15,151 8.673729,0 c 7.756002,0 14.000002,6.16075 14.000002,13.81334 l 0,120.37333 c 0,7.65258 -6.244,13.81333 -14.000002,13.81333 L 15,299 c -7.756,0 -14,0 -14,0 L 1,164.81334 C 1,157.16075 7.244,151 15,151 z"
+ style="fill:#e0e1f3;fill-opacity:1;stroke:#e0e1f3;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+</svg>
Modified: trunk/public/images/secondary_tabs_background_right.png
===================================================================
(Binary files differ)
Added: trunk/public/images/secondary_tabs_background_right.svg
===================================================================
--- trunk/public/images/secondary_tabs_background_right.svg (rev 0)
+++ trunk/public/images/secondary_tabs_background_right.svg 2010-03-24 10:51:20 UTC (rev 1714)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg5548"
+ version="1.1"
+ inkscape:version="0.47pre4 r22446"
+ width="415"
+ height="300"
+ sodipodi:docname="secondary_tabs_background_right.svg"
+ inkscape:export-filename="/home/wybo/logilogi/trunk/public/images/secondary_tabs_background_right.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <metadata
+ id="metadata5554">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs5552">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ id="perspective5556" />
+ <inkscape:perspective
+ id="perspective5568"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective5590"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1366"
+ inkscape:window-height="719"
+ id="namedview5550"
+ showgrid="false"
+ inkscape:zoom="2.2250293"
+ inkscape:cx="207.5"
+ inkscape:cy="159.48185"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg5548" />
+ <path
+ style="fill:#999dd7;fill-opacity:1;stroke:#30367e;stroke-width:2.00837374000000013;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 14.981398,1.0041909 386.037622,0 c 7.74326,0 13.977,6.222664 13.977,13.9521601 l 0,134.039459 c 0,0 -6.23374,-0.004 -13.977,-0.004 l -386.037622,0 c -7.7432607,-2e-4 -13.9772112,0.004 -13.9772112,0.004 l 2.1e-4,-134.039459 c 0,-7.7294961 6.2337405,-13.9521601 13.9770012,-13.9521601 z"
+ id="rect4929"
+ sodipodi:nodetypes="ccccccccc"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <path
+ style="fill:#e0e1f3;fill-opacity:1;stroke:#e0e1f3;stroke-width:2.00837374000000013;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 14.981397,151.00419 386.037623,0 c 7.74326,0 13.977,6.22266 13.977,13.95216 l 0,134.03946 c 0,0 -6.23374,-0.004 -13.977,-0.004 l -386.037623,0 c -7.7432601,-2e-4 -13.9772101,0.004 -13.9772101,0.004 l 2.1e-4,-134.03946 c 0,-7.7295 6.23374,-13.95216 13.9770001,-13.95216 z"
+ id="rect4929-9"
+ sodipodi:nodetypes="ccccccccc" />
+</svg>
Modified: trunk/public/javascripts/application.js
===================================================================
--- trunk/public/javascripts/application.js 2010-03-11 16:31:08 UTC (rev 1713)
+++ trunk/public/javascripts/application.js 2010-03-24 10:51:20 UTC (rev 1714)
@@ -11,6 +11,10 @@
* (doc/LICENSE.txt contains the full text of the legally binding license).
*/
+// For DBR
+
+var preloadFlag = true;
+
// OS detection
var OSystem = {
@@ -20,6 +24,17 @@
navigator.appVersion.indexOf("Linux") != -1)
};
+// Enter submit
+
+function enterSubmit(field_id,form_id) {
+ field = $(field_id);
+ shortcut.add("Enter", function() {
+ if (field.getValue() != "") {
+ $(form_id).submit();
+ }
+ }.bind(field,form_id), {'target' : field});
+}
+
// The popover
var logi_links_loading_gif = new Image();
Added: trunk/public/javascripts/dbr.js
===================================================================
--- trunk/public/javascripts/dbr.js (rev 0)
+++ trunk/public/javascripts/dbr.js 2010-03-24 10:51:20 UTC (rev 1714)
@@ -0,0 +1,2421 @@
+/* -- Adobe GoLive JavaScript Library */
+/* -- Global Functions */
+CSStateArray = new Object;
+CSCookieArray = new Object;
+CSCookieValArray = new Object;
+function CSWriteCookie(action) {
+ var name = "DFT" + action[1];
+ var hrs = action[2];
+ var path = action[3];
+ var domain = action[4];
+ var secure = action[5];
+ var exp = new Date((new Date()).getTime() + hrs * 3600000);
+ var cookieVal = "";
+ for(var prop in CSCookieArray) {
+ if(("DFT" + CSCookieArray[prop]) == name) {
+ if(cookieVal != "") cookieVal += "&";
+ cookieVal += prop + ":" + escape(CSStateArray[prop]);
+ }
+ }
+ if(hrs != 0)
+ cookieVal += "; expires=" + exp.toGMTString();
+ if(path != "")
+ cookieVal += "; path=" + path;
+ if(domain != "")
+ cookieVal += "; domain=" + domain;
+ if(secure == true)
+ cookieVal += "; secure";
+ document.cookie = name + '=' + cookieVal;
+}
+function CSReadCookie(action) {
+ var name = "DFT" + action[1];
+ var cookies = document.cookie;
+ if(cookies == "") return;
+ var start = cookies.indexOf(name);
+ if(start == -1) return;
+ start += name.length + 1;
+ var end = cookies.indexOf(";", start);
+ if(end == -1) end = cookies.length;
+ var cookieVal = cookies.substring(start, end);
+ var arr = cookieVal.split('&');
+ for(var i = 0; i < arr.length; i++) {
+ var a = arr[i].split(':');
+ CSStateArray[a[0]] = unescape(a[1]);
+ }
+}
+function CSDefineState(action) {
+ CSCookieArray[action[1]] = action[3];
+}
+function CSSetState(action) {
+ CSStateArray[action[1]] = action[2];
+}
+function CSInitState(action) {
+ if(typeof(CSStateArray[action[1]]) == "undefined")
+ CSStateArray[action[1]] = action[2];
+}
+function CSCheckState(action) {
+ var obj1 = CSStateArray[action[1]];
+ var obj2 = action[2];
+ if(typeof(obj1) == "object") {
+ for(var i=0;i<obj1.length;i++) {
+ if(obj1[i] != obj2[i])
+ return false;
+ }
+ return true;
+ }
+ var res;
+ var op = action[3];
+ if(op == "==") res = (CSStateArray[action[1]] == action[2]);
+ else if(op == "!=") res = (CSStateArray[action[1]] != action[2]);
+ else if(op == ">" ) res = (CSStateArray[action[1]] > action[2]);
+ else if(op == ">=") res = (CSStateArray[action[1]] >= action[2]);
+ else if(op == "<" ) res = (CSStateArray[action[1]] < action[2]);
+ else if(op == "<=") res = (CSStateArray[action[1]] <= action[2]);
+ return res;
+}
+CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);
+CSIsW3CDOM = ((document.getElementById) && !(IsIE()&&CSBVers<6)) ? true : false;
+function IsIE() { return CSAg.indexOf("MSIE") > 0;}
+function CSIEStyl(s) { return document.all.tags("div")[s].style; }
+function CSNSStyl(s) { if (CSIsW3CDOM) return document.getElementById(s).style; else return CSFindElement(s,0); }
+CSIImg=false;
+function CSInitImgID() {if (!CSIImg && document.images) { for (var i=0; i<document.images.length; i++) { if (!document.images[i].id) document.images[i].id=document.images[i].name; } CSIImg = true;}}
+function CSFindElement(n,ly) { if (CSBVers<4) return document[n];
+ if (CSIsW3CDOM) {CSInitImgID();return(document.getElementById(n));}
+ var curDoc = ly?ly.document:document; var elem = curDoc[n];
+ if (!elem) {for (var i=0;i<curDoc.layers.length;i++) {elem=CSFindElement(n,curDoc.layers[i]); if (elem) return elem; }}
+ return elem;
+}
+function CSGetImage(n) {if(document.images) {return ((!IsIE()&&CSBVers<5)?CSFindElement(n,0):document.images[n]);} else {return null;}}
+CSDInit=false;
+function CSIDOM() { if (CSDInit)return; CSDInit=true; if(document.getElementsByTagName) {var n = document.getElementsByTagName('DIV'); for (var i=0;i<n.length;i++) {CSICSS2Prop(n[i].id);}}}
+function CSICSS2Prop(id) { var n = document.getElementsByTagName('STYLE');for (var i=0;i<n.length;i++) { var cn = n[i].childNodes; for (var j=0;j<cn.length;j++) { CSSetCSS2Props(CSFetchStyle(cn[j].data, id),id); }}}
+function CSFetchStyle(sc, id) {
+ var s=sc; while(s.indexOf("#")!=-1) { s=s.substring(s.indexOf("#")+1,sc.length); if (s.substring(0,s.indexOf("{")).toUpperCase().indexOf(id.toUpperCase())!=-1) return(s.substring(s.indexOf("{")+1,s.indexOf("}")));}
+ return "";
+}
+function CSGetStyleAttrValue (si, id) {
+ var s=si.toUpperCase();
+ var myID=id.toUpperCase()+":";
+ var id1=s.indexOf(myID);
+ if (id1==-1) return "";
+ s=s.substring(id1+myID.length+1,si.length);
+ var id2=s.indexOf(";");
+ return ((id2==-1)?s:s.substring(0,id2));
+}
+function CSSetCSS2Props(si, id) {
+ var el=document.getElementById(id);
+ if (el==null) return;
+ var style=document.getElementById(id).style;
+ if (style) {
+ if (style.left=="") style.left=CSGetStyleAttrValue(si,"left");
+ if (style.top=="") style.top=CSGetStyleAttrValue(si,"top");
+ if (style.width=="") style.width=CSGetStyleAttrValue(si,"width");
+ if (style.height=="") style.height=CSGetStyleAttrValue(si,"height");
+ if (style.visibility=="") style.visibility=CSGetStyleAttrValue(si,"visibility");
+ if (style.zIndex=="") style.zIndex=CSGetStyleAttrValue(si,"z-index");
+ }
+}
+function CSSetStylePos(s,d,p) {
+ if (CSIsW3CDOM)d==0?document.getElementById(s).style.left=p+"px":document.getElementById(s).style.top=p+"px";
+ else if(IsIE())(d==0)?CSIEStyl(s).posLeft=p:CSIEStyl(s).posTop=p;
+ else (d==0)?CSNSStyl(s).left=p:CSNSStyl(s).top=p;
+}
+function CSGetStylePos(s,d) {
+ if (CSIsW3CDOM){CSIDOM();return parseInt((d==0)?document.getElementById(s).style.left:document.getElementById(s).style.top);}
+ else if (IsIE()) {CSIEWinInit();return(d==0)?CSIEStyl(s).posLeft:CSIEStyl(s).posTop;}
+ else {return (d==0)?CSNSStyl(s).left:CSNSStyl(s).top;}
+}
+CSIEWInit=false;
+function CSIEWinInit() { if(CSIEWInit==true) return; else CSIEWInit=true; if (IsIE()&&(CSAg.indexOf("Win")!=-1)&&CSBVers==4) { var i=0; var lyr=document.all.tags("div")[i++]; while(lyr) {lyr.style.posLeft=lyr.offsetLeft; lyr.style.posTop=lyr.offsetTop; lyr=document.all.tags("div")[i++];}}}
+CSLoopIsRunning = false; CSFctArray = new Array; CSTimeoutID = null;
+function CSLoop() {
+ CSLoopIsRunning = false;
+ for (i=0;i<CSFctArray.length;i++) {
+ var curFct = CSFctArray[i];
+ if (curFct) {
+ if (curFct.DoFunction(curFct)) { CSLoopIsRunning = true; curFct.counter++; }
+ else CSFctArray[i] = 0;
+ }
+ }
+ if (CSLoopIsRunning) CSTimeoutID = setTimeout("CSLoop()", 1);
+}
+function CSStartFunction(fct,data) {
+ if (!CSLoopIsRunning) { CSFctArray = 0; CSFctArray = new Array; }
+ var fctInfo = new Object;
+ fctInfo.DoFunction = fct; fctInfo.counter = 0; fctInfo.data = data;
+ CSFctArray[CSFctArray.length] = fctInfo;
+ if (!CSLoopIsRunning) CSLoop();
+}
+function CSStopFunction(sceneName) {
+ var i;
+ for (i=0;i<CSFctArray.length;i++) {
+ var curFct = CSFctArray[i];
+ if (curFct){ if (curFct.data.name == sceneName){ CSFctArray[i] = 0; return; } }
+ }
+}
+function CSStopComplete() {
+ if (CSTimeoutID == null) return;
+ clearTimeout (CSTimeoutID); CSLoopIsRunning = false; CSTimeoutID = null;
+}
+function CSMoveLoop(fInf) {
+ var ticks = 60 * (((new Date()).getTime()) - fInf.data.startTime)/1000;
+ var f = ticks/fInf.data.ticks;
+ if (f < 1) { CSSetStylePos(fInf.data.layer,0,fInf.data.start[0] * (1-f) + fInf.data.end[0] * f);
+ CSSetStylePos(fInf.data.layer,1,fInf.data.start[1] * (1-f) + fInf.data.end[1] * f); return true; }
+ else { CSSetStylePos(fInf.data.layer,0,fInf.data.end[0]);
+ CSSetStylePos(fInf.data.layer,1,fInf.data.end[1]); }
+ return false;
+}
+function CSSlideObj (layer,start,end,ticks,startTime) {
+ this.layer=layer;this.start=start;this.end=end;this.ticks=ticks;this.startTime=startTime;
+}
+function CSSlideLayer(l,pos,anim,ticks) {
+ var x = pos[0]; var y = pos[1];
+ if (l == '') return;
+ if (ticks < 0) ticks = 0;
+ if (!anim) { CSSetStylePos(l,0,x); CSSetStylePos(l,1,y); }
+ else { var fctData = new CSSlideObj(l,new Array(CSGetStylePos(l,0),CSGetStylePos(l,1)),new Array(x,y),ticks,(new Date()).getTime()); CSStartFunction(CSMoveLoop,fctData); }
+}
+function ROFindEmbed (name) {
+ /* only for netscape */
+ if(CSIsW3CDOM) {
+ var emb=null;
+ for(j=0; j<document.embeds.length; j++) {
+ if(document.embeds[j].name==name) {
+ emb=document.embeds[j]; break;
+ }
+ }
+ return emb;
+ }
+ else
+ return CSFindElement(name);
+}
+function ROUnpackVersionNumber(n) {
+ return "" + (n >> 28) + "." +
+ ((n & 0xFF00000) >> 20) + "." +
+ ((n & 0xFF000) >> 12) + "." +
+ ( n & 0xFFF);
+}
+function CSSetStyleVis(s,v) {
+ if (CSIsW3CDOM){CSIDOM();document.getElementById(s).style.visibility=(v==0)?"hidden":"visible";}
+ else if(IsIE())CSIEStyl(s).visibility=(v==0)?"hidden":"visible";
+ else CSNSStyl(s).visibility=(v==0)?'hide':'show';
+}
+function CSGetStyleVis(s) {
+ if (CSIsW3CDOM) {CSIDOM();return(document.getElementById(s).style.visibility=="hidden")?0:1;}
+ else if(IsIE())return(CSIEStyl(s).visibility=="hidden")?0:1;
+ else return(CSNSStyl(s).visibility=='hide')?0:1;
+}
+ROOnPLCArray=new Array();
+function RPOnPositionLengthChange (position, length) {
+ for(var i=0;i<ROOnPLCArray.length;i++) {
+ var obj=ROOnPLCArray[i];
+ if(typeof(obj)=="object") {
+ if(obj.time==position) {
+ if(obj.type=="navigate") {
+ window.parent.external.HandleAction("NavigateToURL("+obj.url+","+obj.target+")");
+ ROOnPLCArray[i]=0;
+ }
+ else if(obj.type=="color") {
+ window.parent.external.SetVideoBackgroundColor(obj.color);
+ ROOnPLCArray[i]=0;
+ }
+ }
+ }
+ }
+}
+function CSGetLayerClip (el) {
+ CSIDOM();
+ if (el.isIE) return (new CSRect(0,0,el.offsetWidth,el.offsetHeight));
+ else if (CSBVers>=5) return (new CSRect(0,0,parseInt(el.style.width),parseInt(el.style.height)));
+ else return (new CSRect(el.clip.left,el.clip.top,el.clip.width,el.clip.height));
+}
+function CSSetLayerClip (el,clipRect) {
+ var l,t,r,b;
+ l=clipRect.left; t=clipRect.top; r=l+clipRect.width; b=t+clipRect.height;
+ if(el.isIE) { el.style.clip = "rect("+ t + " " + r + " " + b + " " + l + ")"; }
+ else if (CSBVers>=5) el.style.clip = "rect("+ t + "px, " + r + "px, " + b + "px, " + l + "px)";
+ else { el.clip.left=l; el.clip.top=t; el.clip.width=clipRect.width; el.clip.height=clipRect.height; }
+ CSSetStyleVis(el.layer);
+}
+function CSRect (left,top,width,height) {
+this.left=left; this.top=top; this.width=width; this.height=height;
+}
+function CSCreateTransElement (layer, steps) {
+ var el;
+ if (IsIE()) el=document.all.tags("div")[layer];
+ else if (CSBVers>=5) el=document.getElementById(layer);
+ else el=CSNSStyl(layer);
+ if (el==null) return null;
+ if (el.locked && (el.locked == true)) return null;
+ el.isIE=IsIE();
+ el.clipRect=CSGetLayerClip(el);
+ if (el.clipRect==null) return null;
+ el.maxValue=steps;
+ if (el.maxValue<=0) el.maxValue=30;
+ el.modus=""; el.layer=layer;
+ el.width=el.clipRect.width; el.height=el.clipRect.height;
+ el.locked = true;
+ return el;
+}
+function CSDisposeTransElement (el) { el.locked = false; }
+function CSScriptInit() {
+if(typeof(skipPage) != "undefined") { if(skipPage) return; }
+idxArray = new Array;
+for(var i=0;i<CSInit.length;i++)
+ idxArray[i] = i;
+CSAction2(CSInit, idxArray);
+}
+function CSScriptExit() {
+idxArray = new Array;
+for(var i=0;i<CSExit.length;i++)
+ idxArray[i] = i;
+CSAction2(CSExit, idxArray);
+}
+CSInit = new Array;
+CSExit = new Array;
+CSStopExecution=false;
+function CSAction(array) {return CSAction2(CSAct, array);}
+function CSAction2(fct, array) {
+ var result;
+ for (var i=0;i<array.length;i++) {
+ if(CSStopExecution) return false;
+ var aa = fct[array[i]];
+ if (aa == null) return false;
+ var ta = new Array;
+ for(var j=1;j<aa.length;j++) {
+ if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){
+ if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];}
+ else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));}
+ else ta[j]=aa[j];}
+ } else ta[j]=aa[j];
+ }
+ result=aa[0](ta);
+ }
+ return result;
+}
+CSAct = new Object;
+CSIm=new Object();
+function CSIShow(n,i) {
+ if (document.images) {
+ if (CSIm[n]) {
+ var img=CSGetImage(n);
+ if (img&&typeof(CSIm[n][i].src)!="undefined") {img.src=CSIm[n][i].src;}
+ if(i!=0) self.status=CSIm[n][3]; else self.status=" ";
+ return true;
+ }
+ }
+ return false;
+}
+function CSILoad(action) {
+ im=action[1];
+ if (document.images) {
+ CSIm[im]=new Object();
+ for (var i=2;i<5;i++) {
+ if (action[i]!='') {CSIm[im][i-2]=new Image(); CSIm[im][i-2].src=action[i];}
+ else CSIm[im][i-2]=0;
+ }
+ CSIm[im][3] = action[5];
+ }
+}
+function newImage(arg) {
+ if (document.images) {
+ rslt = new Image();
+ rslt.src = arg;
+ return rslt;
+ }
+}
+userAgent = window.navigator.userAgent;
+browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
+mustInitImg = true;
+function initImgID() {var di = document.images; if (mustInitImg && di) { for (var i=0; i<di.length; i++) { if (!di[i].id) di[i].id=di[i].name; } mustInitImg = false;}}
+function findElement(n,ly) {
+ var d = document;
+ if (browserVers < 4) return d[n];
+ if ((browserVers >= 6) && (d.getElementById)) {initImgID; return(d.getElementById(n))};
+ var cd = ly ? ly.document : d;
+ var elem = cd[n];
+ if (!elem) {
+ for (var i=0;i<cd.layers.length;i++) {
+ elem = findElement(n,cd.layers[i]);
+ if (elem) return elem;
+ }
+ }
+ return elem;
+}
+function changeImagesArray(array) {
+ if (preloadFlag == true) {
+ var d = document; var img;
+ for (i=0;i<array.length;i+=2) {
+ img = null; var n = array[i];
+ if (d.images) {
+ if (d.layers) {img = findElement(n,0);}
+ else {img = d.images[n];}
+ }
+ if (!img && d.getElementById) {img = d.getElementById(n);}
+ if (!img && d.getElementsByName) {
+ var elms = d.getElementsByName(n);
+ if (elms) {
+ for (j=0;j<elms.length;j++) {
+ if (elms[j].src) {img = elms[j]; break;}
+ }
+ }
+ }
+ if (img) {img.src = array[i+1];}
+ }
+ }
+}
+function changeImages() {
+ changeImagesArray(changeImages.arguments);
+}
+function toggleImages() {
+ for (var i=0; i<toggleImages.arguments.length; i+=2) {
+ if (selected == toggleImages.arguments[i])
+ changeImagesArray(toggleImages.arguments[i+1]);
+ }
+}
+function CSClickReturn () {
+ var bAgent = window.navigator.userAgent;
+ var bAppName = window.navigator.appName;
+ if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
+ return true; /* dont follow link */
+ else return false; /* dont follow link */
+}
+function CSButtonReturn () { return !CSClickReturn(); }
+function CSBrowserSwitch(action) {
+ var bAgent = window.navigator.userAgent;
+ var bAppName = window.navigator.appName;
+ var isNS = (bAppName.indexOf("Netscape") >= 0);
+ var isIE = (bAppName.indexOf("Explorer") >= 0);
+ var isWin = (bAgent.indexOf("Win") >= 0);
+ var isMac = (bAgent.indexOf("Mac") >= 0);
+ var vers = 0;
+ var versIdx = (bAgent.indexOf("Mozilla/"));
+ if(versIdx >= 0)
+ {
+ var sstr = bAgent.substring(versIdx + 8, versIdx + 9);
+ vers = parseInt(sstr) - 2;
+ }
+ var url = action[1];
+ var platform = action[2];
+ var versVec;
+ if(platform)
+ {
+ if(isNS && isMac) versVec = action[3];
+ if(isIE && isMac) versVec = action[5];
+ if(isNS && isWin) versVec = action[4];
+ if(isIE && isWin) versVec = action[6];
+ }
+ else
+ {
+ if(isNS) versVec = action[3];
+ if(isIE) versVec = action[4];
+ }
+ if(vers > (versVec.length-1))
+ vers = versVec.length-1;
+ if(versVec[vers] == 0)
+ {
+ location = url;
+ CSStopExecution = true;
+ }
+}
+function CSURLPopupShow(formName, popupName, target) {
+ var form = (!IsIE()&&CSBVers>=5)?document.forms[formName]:CSFindElement(formName);
+ var popup = form.elements[popupName];
+ window.open(popup.options[popup.selectedIndex].value, target);
+ popup.selectedIndex = 0;
+}
+function CSSetStyleDepth(s,depth) {
+ if (CSIsW3CDOM)document.getElementById(s).style.zIndex=depth;
+ else if (IsIE())CSIEStyl(s).zIndex=depth;
+ else CSNSStyl(s).zIndex=depth;
+}
+function CSGetStyleDepth(s) {
+ if (CSIsW3CDOM){CSIDOM();return document.getElementById(s).style.zIndex;}
+ else if (IsIE())return (CSIEStyl(s).zIndex);
+ else return (CSNSStyl(s).zIndex);
+}
+CSSeqArray = new Array;
+function CSSeqActionFct(seq,loopCount,continueLoop) {
+ if ((seq.loop < 2) || ((loopCount % 2) != 0)) {
+ for (var i=0;i<seq.actionCount;i++) {
+ if (seq.actions[3*i + 1] <= seq.frame) {
+ if ((loopCount > 1) && (seq.actions[3*i + 1] < seq.start)) continue;
+ if (seq.actions[3*i + 2] < loopCount) {
+ seq.actions[3*i + 2] = loopCount; CSLoopIsRunning = true;
+ CSAction(new Array(seq.actions[3*i + 0])); continueLoop = true;
+ }
+ } else { continueLoop = true; break; }
+ }
+ } else {
+ for (var i=seq.actionCount-1;i>=0;i--) {
+ if (seq.actions[3*i + 1] > seq.frame) {
+ if (seq.actions[3*i + 1] > seq.end) continue;
+ if (seq.actions[3*i + 2] < loopCount) {
+ seq.actions[3*i + 2] = loopCount; CSLoopIsRunning = true;
+ CSAction(new Array(seq.actions[3*i + 0])); continueLoop = true;
+ }
+ } else { continueLoop = true; break; }
+ }
+ }
+ return continueLoop;
+}
+function CSSeqFunction(fctInfo)
+{
+ var seq = fctInfo.data; var oldFrame = seq.frame;
+ var newTicks = (new Date()).getTime();
+ seq.frame = Math.round((seq.fps * (newTicks - seq.startTicks)/1000.0) - 0.5);
+ var continueLoop = false; var loopCount = 1;
+
+ if (seq.loop > 0) {
+ continueLoop = true;
+ if (seq.loop == 1) {
+ var iv = (seq.end - seq.start);
+ var f = Math.round(((seq.frame - seq.start) / iv) - 0.5);
+ if (f < 0) f = 0;
+ loopCount = f+1;
+ seq.frame = seq.start + ((seq.frame - seq.start) % (seq.end - seq.start));
+ } else {
+ var iv = (seq.end - seq.start);
+ var f = Math.round(((seq.frame - seq.start) / iv) - 0.5);
+ if (f < 0) f = 0;
+ loopCount = f+1;
+ f = (seq.frame - seq.start) % (2 * iv);
+ if (f > iv) f = 2*iv - f;
+ seq.frame = seq.start + f;
+ }
+ }
+ continueLoop = CSSeqActionFct(seq,loopCount,continueLoop);
+ for (var i=0;i<seq.tracks.length;i++) {
+ var track = seq.tracks[i]; var frameCount = 0; var lastCount = 0; var partCount = 0;
+ var partIdx = track.parts.ticks.length;
+ for (var k=0;k<track.parts.ticks.length;k++) {
+ frameCount += track.parts.ticks[k];
+ if (frameCount > seq.frame) { partIdx = k; partCount = seq.frame - lastCount; break; }
+ lastCount = frameCount;
+ }
+ if (partIdx < track.parts.ticks.length) {
+ var type=track.parts.moveType[partIdx];
+ if(type==1) CSSetLinearPos (track, partIdx, partCount);
+ else if(type==2) CSSetCurvePos (track, partIdx, partCount);
+ else if(type==3) if (oldFrame != seq.frame) CSSetRandomPos (track, partIdx, partCount);
+ else { x = CSGetStylePos(track.layer,0); y = CSGetStylePos(track.layer,1); }
+ CSSetStyleVis(track.layer,track.parts.visibilities[partIdx]);
+ CSSetStyleDepth(track.layer,track.parts.depths[partIdx]);
+ continueLoop = true;
+ } else {
+ var partIdx = track.parts.moveType.length-1;
+ var posArray = track.parts.positions;
+ var x = posArray[partIdx * 6 + 0]; var y = posArray[partIdx * 6 + 1];
+ CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y);
+ CSSetStyleVis(track.layer,track.parts.visibilities[partIdx]);
+ CSSetStyleDepth(track.layer,track.parts.depths[partIdx]);
+ }
+ }
+ return continueLoop;
+}
+function CSSetLinearPos (track, partIdx, partCount) {
+ var curTicks = track.parts.ticks[partIdx];
+ var pIdx1 = partIdx * 6; var pIdx2 = (partIdx+1) * 6;
+ var posArray = track.parts.positions;
+ var x = posArray[pIdx1 + 0]; var y = posArray[pIdx1 + 1];
+ var x1,x2,y1,y2;
+ var factor = partCount/curTicks;
+ x1 = x; y1 = y;
+ x2 = posArray[pIdx2 + 0]; y2 = posArray[pIdx2 + 1];
+ x = x1 * (1-factor) + x2 * factor; y = y1 * (1-factor) + y2 * factor;
+ CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y);
+}
+function CSSetCurvePos (track, partIdx, partCount) {
+ var curTicks = track.parts.ticks[partIdx];
+ var pIdx1 = partIdx * 6; var pIdx2 = (partIdx+1) * 6;
+ var posArray = track.parts.positions;
+ var x = posArray[pIdx1 + 0]; var y = posArray[pIdx1 + 1];
+ var x1,x2,x3,x4,y1,y2,y3,y4;
+ var factor = partCount/curTicks;
+ var t = factor; var u = t * t; var v = u * t;
+ var val1 = 3*(u-t) - v + 1; var val2 = 3*(v+t - 2*u); var val3 = 3*(u-v); var val4 = v;
+ x1 = x; y1 = y; x2 = posArray[pIdx1 + 2]; y2 = posArray[pIdx1 + 3];
+ x3 = posArray[pIdx1 + 4]; y3 = posArray[pIdx1 + 5];
+ x4 = posArray[pIdx2 + 0]; y4 = posArray[pIdx2 + 1];
+ x = x1 * val1 + x2 * val2 + x3 * val3 + x4 * val4;
+ y = y1 * val1 + y2 * val2 + y3 * val3 + y4 * val4;
+ CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y);
+}
+function CSSetRandomPos (track, partIdx, partCount) {
+ var curTicks = track.parts.ticks[partIdx];
+ var pIdx1 = partIdx * 6; var pIdx2 = (partIdx+1) * 6;
+ var posArray = track.parts.positions;
+ var x = posArray[pIdx1 + 0]; var y = posArray[pIdx1 + 1];
+ var x1,x2,y1,y2;
+ var factor = partCount/curTicks;
+ x1 = x; y1 = y;
+ x2 = posArray[pIdx2 + 0]; y2 = posArray[pIdx2 + 1];
+ var factorx = Math.random(); var factory = Math.random();
+ x = x1 * (1-factorx) + x2 * factorx; y = y1 * (1-factory) + y2 * factory;
+ CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y);
+}
+function CSStartSeq(name) {
+ var seq = CSGetScene(name); var date = new Date()
+ seq.startTicks = date.getTime()
+ for (var i=0;i<seq.actionCount;i++) seq.actions[3*i+2] = 0;
+ CSStartFunction(CSSeqFunction,seq);
+}
+function CSSceneObj (name,fps,loop,start,end,frame,sTicks,numAct,acts,tracks) {
+ this.name=name;this.fps=fps;this.loop=loop;this.start=start;this.end=end;
+ this.frame=frame;this.startTicks=sTicks;this.actionCount=numAct;
+ this.actions=acts;this.tracks=tracks;
+}
+function CSTrackObj (name,partIdx,partCount,parts) {
+ this.layer=name;this.partIdx=partIdx;this.partCount=partCount;this.parts=parts;
+}
+function CSPartObj (ticks,pos,depths,vis,moveType) {
+ this.ticks=ticks;this.positions=pos;this.depths=depths;this.visibilities=vis;
+ this.moveType=moveType;
+}
+function CSGetScene (name) {
+ for (i=0;i<CSSeqArray.length;i++) { var seq = CSSeqArray[i]; if (seq.name==name) return seq; }
+ return 0;
+}
+function CSAutoStartScene(action) { CSStartSeq (action[1]); }
+/* -- Action Functions */
+function CSActionGroup (action) {
+ for(var i=1;i<action.length;i++) { CSAction(new Array(action[i])); }
+}
+function ROAddToNowPlayingList (act) {
+ var i,url,clipinfo,related_info_url,width,height,media_browser_url,target;
+ url=act[1];
+ related_info_url=act[2];
+ if(related_info_url=="(EmptyReference!)")related_info_url="";
+ width=act[3];
+ height=act[4];
+ media_browser_url=act[5];
+ if(media_browser_url=="(EmptyReference!)")media_browser_url="";
+ if(act[6]==0)target="_rpbrowser";
+ else target="_rpexternal";
+ clipinfo="Album name="+act[7];
+ clipinfo+="|Artist name="+act[8];
+ clipinfo+="|CDNum="+act[9];
+ clipinfo+="|Comments="+act[10];
+ clipinfo+="|Genre="+act[11];
+ clipinfo+="|Language="+act[12];
+ clipinfo+="|Mood="+act[13];
+ clipinfo+="|Preference="+act[14];
+ clipinfo+="|Situation="+act[15];
+ clipinfo+="|Title="+act[16];
+ clipinfo+="|Year="+act[17];
+ window.parent.external.AddToNowPlaying (url, clipinfo, related_info_url, width, height, media_browser_url, target);
+}
+function CSCallAction(action)
+{
+ CSAction(new Array(action[1]));
+}
+function CSCallFunction(action)
+{
+ var str = action[1];
+ str += "(";
+ str += action[2];
+ str += ");"
+ return eval(str);
+}
+function ROClearNowPlayingList (act) {
+ window.parent.external.ClearNowPlaying();
+}
+function CSshowtimedateID(action) {
+ (action[2] != "") ? (updateobject = action[2]) : (updateobject = action[1])
+ showtime = action[3]
+ usemilitary = action[4]
+ showdate = action[5]
+ dateformat = action[6]
+ showday = action[7]
+ leadin = action[8]
+ opentag = action[9]
+ closetag = action[10]
+ theTimer = setTimeout("theClockDate()",10);
+}
+function theClockDate() {
+ now = new Date()
+ theMonth = now.getMonth() + 1
+ theDate = now.getDate()
+ theYear = now.getFullYear()
+ theDay = now.getDay()
+ hours = now.getHours()
+ if(navigator.appVersion.indexOf("MSIE 5.0; Macintosh") != -1) {
+ if (theMonth <= 11 && theMonth >= 4) { hours = hours + 1}
+ }
+ ampm = ((hours >= 12) ? "PM" : "AM");
+ hours = ((hours > 12 && usemilitary == false) ? hours -12 : hours);
+ if (hours == 0) hours = 12;
+ if (hours >= 1 && hours <=9) hours = "0" + hours;
+ minutes = now.getMinutes()
+ if (minutes < 10) minutes = "0" + minutes;
+ time = "";
+ (showtime == true) ? (time = " " + hours + ":" + minutes) : (time = "",ampm="");
+ (usemilitary == true) ? (ampm="") : (ampm=ampm);
+ days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
+ today = days[theDay];
+ if (showdate == true) {
+ if (dateformat == 0) todisplay = theMonth + "/" + theDate + "/" + theYear;
+ if (dateformat == 1) todisplay = theDate + "/" + theMonth + "/" + theYear;
+ if (dateformat == 2) todisplay = theYear + "/" + theMonth + "/" + theDate;
+ if (dateformat == 3) todisplay = theYear + "/" + theDate + "/" + theMonth;
+ } else {todisplay = "" }
+ if (showday == true) todisplay = today + ", " + todisplay;
+ if (document.all) { document.all(updateobject).innerHTML = opentag + leadin + todisplay + time + " " + ampm + closetag; }
+ else {
+ if (document.getElementById) { document.getElementById(updateobject).innerHTML = opentag + leadin + todisplay + time + " " + ampm + closetag; }
+}
+theTimer = setTimeout("theClockDate()",2000);
+}
+function CSCloseWindow() {
+if (self.parent.frames.length != 0) {
+ self.parent.close()
+ } else {
+ window.close()
+ }
+}
+function CSConditionAction(action) {
+ if (action[1]) {
+ if (CSAction(new Array(action[1])) == true) {
+ if (action[2]) CSAction(new Array(action[2]));
+ } else if (action[3]) CSAction(new Array(action[3]));
+ }
+}
+function WBConfirmLink(action) {
+ if (checkIt(action)) {
+ if (action[2] != "(Empty Reference!)" && action[2] != "(EmptyReference!)") {
+ if (action[3].length < 1) {
+ parent.location.href=action[2];
+ }
+ else {
+ parent.frames[action[3]].location.href=action[2];
+ }
+ }
+ }
+ return;
+}
+function checkIt(action) {
+ var carryOn = window.confirm(action[1]);
+ return carryOn;
+ }
+function CSCSSRedirect(action) {
+if (navigator.platform.indexOf("Win32") != -1) { os = "windows" };
+if (navigator.platform.indexOf("Mac") != -1) { os = "mac" };
+if (navigator.platform.indexOf("x") != -1 || navigator.platform.indexOf("BSD") != -1 || navigator.platform.indexOf("S") != -1) { os = "unix" };
+if (navigator.appName.indexOf("Microsoft") != -1) { browser = "IE" };
+if (navigator.appName.indexOf("Netscape") != -1) { browser = "NN" };
+if (navigator.appVersion.indexOf("4.") != -1) { version = 4 };
+if (navigator.appVersion.indexOf("5.") != -1) { version = 5 };
+var tag='<LINK REL="styleSheet" TYPE="text/css" HREF="'+action[2]+'" >';
+var type=action[1];
+ if(type==0 && os=="mac" && browser=="NN" && version==4) { document.write(tag) }
+ else
+ if(type==1 && os=="mac" && browser=="NN" && version==5) { document.write(tag) }
+ else
+ if(type==2 && os=="windows" && browser=="NN" && version==4) { document.write(tag) }
+ else
+ if(type==3 && os=="windows" && browser=="NN" && version==5) { document.write(tag) }
+ else
+ if(type==4 && os=="unix" && browser=="NN" && version==4) { document.write(tag) }
+ else
+ if(type==5 && os=="unix" && browser=="NN" && version==5) { document.write(tag) }
+ else
+ if(type==6 && os=="mac" && browser=="IE") { document.write(tag) }
+ else
+ if(type==7 && os=="windows" && browser=="IE") { document.write(tag) }
+}
+function initIArray() {
+this.length = initIArray.arguments.length;
+for (var i = 0; i < this.length; i++)
+this[i+1] = initIArray.arguments[i];
+}
+function dailyImageURL(action) {
+var dateArray = new
+initIArray("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
+var today = new Date();
+var day = dateArray[today.getDay()];
+if (today.getDay() == 0) { day = "Sunday"; }
+var img = null;
+if (document.images) {
+ if (!IsIE()&&CSBVers<5) img = CSFindElement(action[1],0);
+ else img = document.images[action[1]];
+ if (img) {
+ if (day == "Monday" && action[2] != "(Empty Reference!)" && action[2] != "(EmptyReference!)") img.src = action[2]
+ if (day == "Tuesday" && action[3] != "(Empty Reference!)" && action[3] != "(EmptyReference!)") img.src = action[3]
+ if (day == "Wednesday" && action[4] != "(Empty Reference!)" && action[4] != "(EmptyReference!)") img.src = action[4]
+ if (day == "Thursday" && action[5] != "(Empty Reference!)" && action[5] != "(EmptyReference!)") img.src = action[5]
+ if (day == "Friday" && action[6] != "(Empty Reference!)" && action[6] != "(EmptyReference!)") img.src = action[6]
+ if (day == "Saturday" && action[7] != "(Empty Reference!)" && action[7] != "(EmptyReference!)") img.src = action[7]
+ if (day == "Sunday" && action[8] != "(Empty Reference!)" && action[8] != "(EmptyReference!)") img.src = action[8]
+ }
+}
+}
+function initArray() {
+this.length = initArray.arguments.length;
+for (var i = 0; i < this.length; i++)
+this[i+1] = initArray.arguments[i];
+}
+function dailyRedirect(action) {
+var dateArray = new
+initArray("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
+var today = new Date();
+var day = dateArray[today.getDay()];
+if (today.getDay() == 0) { day = "Sunday"; }
+if (day == "Monday" && action[1] != "(Empty Reference!)" && action[1] != "(EmptyReference!)") window.location = action[1]
+if (day == "Tuesday" && action[2] != "(Empty Reference!)" && action[2] != "(EmptyReference!)") window.location = action[2]
+if (day == "Wednesday" && action[3] != "(Empty Reference!)" && action[3] != "(EmptyReference!)") window.location = action[3]
+if (day == "Thursday" && action[4] != "(Empty Reference!)" && action[4] != "(EmptyReference!)") window.location = action[4]
+if (day == "Friday" && action[5] != "(Empty Reference!)" && action[5] != "(EmptyReference!)") window.location = action[5]
+if (day == "Saturday" && action[6] != "(Empty Reference!)" && action[6] != "(EmptyReference!)") window.location = action[6]
+if (day == "Sunday" && action[7] != "(Empty Reference!)" && action[7] != "(EmptyReference!)") window.location = action[7]
+}
+function CSDeleteCookie(action)
+{
+var name=action[1]
+var value=action[2]
+var jours=-12000
+path="/"
+domain=null
+var expdate = new Date ();
+expdate.setTime (expdate.getTime() + (jours * 60 * 60 * 1000));
+SetCookie(name,value,expdate)
+}
+function SetCookie (name, value) {
+ var argv = SetCookie.arguments;
+ var argc = SetCookie.arguments.length;
+ var expires = (argc > 2) ? argv[2] : null;
+ var secure = (argc > 5) ? argv[5] : false;
+ document.cookie = name + "=" + escape (value) +
+ ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
+ ((path == null) ? "" : ("; path=" + path)) +
+ ((domain == null) ? "" : ("; domain=" + domain)) +
+ ((secure == true) ? "; secure" : "");
+}
+function CSdigitalclock(action){
+img1 = CSGetImage(action[1]);
+img2 = CSGetImage(action[2]);
+img3 = CSGetImage(action[3]);
+img4 = CSGetImage(action[4]);
+usemilitary = action[5];
+giflocation = action[6];
+path = giflocation.substring(0, giflocation.length - 5);
+extension = (giflocation.indexOf("jpg") != -1) ? (".jpg") : (".gif");
+digClock();
+}
+function digClock() {
+now = new Date();
+hours = now.getHours();
+theMonth = now.getMonth();
+if(navigator.appVersion.indexOf("MSIE 5.0; Macintosh") != -1) {
+ if (theMonth <= 11 && theMonth >= 4) { hours = hours + 1 };
+ if (hours == 24) { hours = 0 };
+ }
+minutes = now.getMinutes();
+hours = ((hours > 12 && usemilitary == false) ? hours -12 : hours);
+if (hours >= 0 && hours <=9) hours = "0" + hours;
+if (usemilitary == false && hours == 00) { hours = 12 };
+if (minutes >= 0 && minutes <=9) minutes = "0" + minutes;
+hours = "" + hours;
+minutes = "" + minutes;
+hour1 = hours.substring(0,1);
+hour2 = hours.substring(1,2);
+minutes1 = minutes.substring(0,1);
+minutes2 = minutes.substring(1,2);
+updater();
+}
+
+function updater() {
+img1.src = path + hour1 + extension;
+img2.src = path + hour2 + extension;
+img3.src = path + minutes1 + extension;
+img4.src = path + minutes2 + extension;
+theTimer = setTimeout("digClock()",1000);
+}
+function CSDocWrite(action) { document.write(action[1]); }
+var gCSIEDragObject = null;
+var gDragX,gDragY;
+function CSSetupDrag (layerName) {
+ this.x = 0; this.y = 0;
+ if (IsIE()) {
+ this.canDrag=true;
+ this.layerObj=document.all.tags("div")[layerName];
+ this.layerObj.dragObj = this;
+ document.
+ document.
+ document.
+ } else {
+ if (CSBVers>=5)
+ {
+ this.layerObj=document.getElementById(layerName);
+ this.layerObj.addEventListener("mousedown", CSNS6StartDrag, true);
+ this.layerObj.addEventListener("mouseup", CSNS6StopDrag, true);
+ }
+ else
+ {
+ this.layer=CSNSStyl(layerName);this.
+ this.layer.document.theLayer=this;
+ this.layer.document.captureEvents(Event.MOUSEDOWN);
+ this.layer.document.
+ this.layer.document.
+ }
+ }
+}
+function CSNS6StartDrag (ev) {
+ CSIDOM();
+ ev.currentTarget.addEventListener("mousemove", CSNS6DoDrag, true);
+ gDragX=ev.clientX;
+ gDragY=ev.clientY;
+ ev.preventDefault();
+}
+function CSNS6DoDrag (ev) {
+ var style=ev.currentTarget.style;
+ style.left = parseInt(style.left)+(ev.clientX-gDragX)+"px";
+ style.top = parseInt(style.top)+(ev.clientY-gDragY)+"px";
+ gDragX=ev.clientX;
+ gDragY=ev.clientY;
+}
+function CSNS6StopDrag (ev) {
+ ev.target.removeEventListener("mousedown", CSNS6StartDrag, true);
+ ev.target.removeEventListener("mouseup", CSNS6StopDrag, true);
+ ev.currentTarget.removeEventListener("mousemove", CSNS6DoDrag, true);
+ ev.preventDefault();
+}
+function CSNSStartDrag (ev) {
+ var clickInMe = false;
+ if (ev.target != this) {
+ for (var i=0;i<this.images.length;i++) {
+ if (this.images[i] == ev.target) { clickInMe = true; break;}
+ }
+ }
+ else clickInMe = true;
+ if (clickInMe)
+ {
+ this.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
+ this.
+ this.theLayer.x= ev.pageX;
+ this.theLayer.y= ev.pageY;
+ this.routeEvent(ev);
+ return false;
+ }
+ this.
+ this.routeEvent(ev);
+ return true;
+}
+function CSNSStopDrag (ev) {
+ this. false;
+}
+function CSNSDoDrag (ev) {
+ this.theLayer.layer.moveBy(ev.pageX-this.theLayer.x, ev.pageY-this.theLayer.y);
+ this.theLayer.x = ev.pageX;
+ this.theLayer.y = ev.pageY;
+ this.routeEvent(ev);
+}
+function CSIEStartDrag () {
+ if(gCSIEDragObject != null && (gCSIEDragObject.tagName==event.srcElement.tagName))
+ event.returnValue=false;
+}
+function CSIEStopDrag () { gCSIEDragObject=null; document. }
+function CSIEMouseDown () {
+ if(event.button==1) {
+ dragLayer = event.srcElement;
+ while (dragLayer!=null)
+ {
+ if ((dragLayer.dragObj == null) && (dragLayer.tagName == "DIV"))
+ break;
+ if (dragLayer.dragObj != null)
+ break;
+ dragLayer=dragLayer.parentElement;
+ }
+
+ if (dragLayer == null) return;
+ if (dragLayer.dragObj!=null && dragLayer.dragObj.canDrag) {
+ gCSIEDragObject = dragLayer;
+ gCSIEDragObject.dragObj.x=event.clientX;
+ gCSIEDragObject.dragObj.y=event.clientY;
+ document.
+ }
+ }
+}
+function CSIEMouseMove () {
+ gCSIEDragObject.dragObj.layerObj.style.pixelLeft+=(event.clientX-gCSIEDragObject.dragObj.x);
+ gCSIEDragObject.dragObj.layerObj.style.pixelTop+=(event.clientY-gCSIEDragObject.dragObj.y);
+ gCSIEDragObject.dragObj.x=event.clientX;
+ gCSIEDragObject.dragObj.y=event.clientY;
+ event.returnValue = false;
+ event.cancelBubble = true;
+}
+var gDragArray = new Array();
+function CSDrag(action) { gDragArray[gDragArray.length] = new CSSetupDrag(action[1]); }
+functio...
[truncated message content] |