[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6059] trunk



Revision: 6059
          http://sourceforge.net/p/ledger-smb/code/6059
Author:   einhverfr
Date:     2013-09-19 07:33:29 +0000 (Thu, 19 Sep 2013)
Log Message:
-----------
Dojo routines shimmed into old code

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm
    trunk/bin/aa.pl
    trunk/bin/arap.pl
    trunk/bin/gl.pl
    trunk/bin/ic.pl
    trunk/bin/io.pl
    trunk/bin/ir.pl
    trunk/bin/is.pl
    trunk/bin/oe.pl
    trunk/bin/pe.pl
    trunk/old-handler.pl

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/LedgerSMB/Form.pm	2013-09-19 07:33:29 UTC (rev 6059)
@@ -75,6 +75,9 @@
 
 our $logger = Log::Log4perl->get_logger('LedgerSMB::Form');
 
+# To be later set in config, but also hardwired in Template::HTML --CT
+my $dojo_theme = 'claro';
+
 =item new Form([$argstr])
 
 Returns a reference to new Form object.  The initial set of attributes is
@@ -126,6 +129,7 @@
         utf8::upgrade($self->{$p});
     }
     $self->{action} = "" unless defined $self->{action};
+    $self->{dojo_theme} = $dojo_theme;
 
     if($self->{header})
     {
@@ -652,6 +656,18 @@
 	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
 	$stylesheet
 	$charset
+        <link rel="stylesheet" href="UI/lib/dojo/dijit/themes/$dojo_theme/$dojo_theme.css" type="text/css" title="LedgerSMB stylesheet" />
+        <link rel="stylesheet" href="UI/lib/dojo/dojo/resources/dojo.css" type="text/css" title="LedgerSMB stylesheet" />
+        <script type="text/javascript" language="JavaScript">    
+          var dojoConfig = {
+               async: 1,
+               parseOnLoad: 0,
+               packages: [{"name":"lsmb","location":"../../.."}]
+           }
+           var dateformat = '| . $self->{_myconfig}->{dateformat} . qq|';
+        </script>
+       <script type="text/javascript" language="JavaScript" src="UI/lib/dojo/dojo/dojo.js"></script>
+        <script type="text/javascript" language="JavaScript" src="UI/lib/setup.js"></script>
 	<meta name="robots" content="noindex,nofollow" />
         $headeradd
 </head>

Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/bin/aa.pl	2013-09-19 07:33:29 UTC (rev 6059)
@@ -537,7 +537,7 @@
     $form->header;
 
  print qq|
-<body onload="document.forms[0].${focus}.focus()" /> | .
+<body class="$form->{dojo_theme}" onload="document.forms[0].${focus}.focus()" /> | .
 $form->open_status_div . qq|
 <form method=post action=$form->{script}>
 <input type=hidden name=type value="$form->{formname}">
@@ -1187,7 +1187,7 @@
     if ($form->{callback}){
         print "Location: $form->{callback}\n";
         print "Status: 302 Found\n\n";
-        print "<html><body>";
+        print qq|<html><body class="$form->{dojo_theme}">|;
         my $url = $form->{callback};
         print qq|If you are not redirected automatically, click <a href="$url">|
                 . qq|here</a>.</body></html>|;
@@ -1445,7 +1445,7 @@
 	    if ($form->{callback}){
 		print "Location: $form->{callback}\n";
 		print "Status: 302 Found\n\n";
-		print "<html><body>";
+		print qq|<html><body class="$form->{dojo_theme}">|;
 		my $url = $form->{callback};
 		print qq|If you are not redirected automatically, click <a href="$url">|
 			. qq|here</a>.</body></html>|;
@@ -1683,7 +1683,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 

Modified: trunk/bin/arap.pl
===================================================================
--- trunk/bin/arap.pl	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/bin/arap.pl	2013-09-19 07:33:29 UTC (rev 6059)
@@ -184,7 +184,7 @@
     $title = $locale->text('Select from one of the names below');
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -400,7 +400,7 @@
     $title = $locale->text('Select from one of the projects below');
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -744,7 +744,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 

Modified: trunk/bin/gl.pl
===================================================================
--- trunk/bin/gl.pl	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/bin/gl.pl	2013-09-19 07:33:29 UTC (rev 6059)
@@ -120,7 +120,7 @@
     if ($form->{callback}){
         print "Location: $form->{callback}\n";
         print "Status: 302 Found\n\n";
-        print "<html><body>";
+        print "<html><body class="$form->{dojo_theme}">";
         my $url = $form->{callback};
         print qq|If you are not redirected automatically, click <a href="$url">|
                 . qq|here</a>.</body></html>|;

Modified: trunk/bin/ic.pl
===================================================================
--- trunk/bin/ic.pl	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/bin/ic.pl	2013-09-19 07:33:29 UTC (rev 6059)
@@ -746,7 +746,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 | . $form->open_status_div . qq|
 
 <form method=post action="$form->{script}">
@@ -1718,7 +1718,7 @@
     $title = $locale->text('Select from one of the names below');
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action="$form->{script}">
 
@@ -2027,7 +2027,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -2139,7 +2139,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 

Modified: trunk/bin/io.pl
===================================================================
--- trunk/bin/io.pl	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/bin/io.pl	2013-09-19 07:33:29 UTC (rev 6059)
@@ -140,7 +140,7 @@
     if ($form->{callback}){
         print "Location: $form->{callback}\n";
         print "Status: 302 Found\n\n";
-        print "<html><body>";
+        print qq|<html><body class="$form->{dojo_theme}">|;
         my $url = $form->{callback};
         print qq|If you are not redirected automatically, click <a href="$url">|
                 . qq|here</a>.</body></html>|;
@@ -578,7 +578,7 @@
     $title = $locale->text('Select items');
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action="$form->{script}">
 
@@ -849,7 +849,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <h4 class=error>| . $locale->text('Item not on file!') . qq|</h4>|;
 
@@ -2064,7 +2064,7 @@
 
 
     print qq|
-               <body>
+               <body class="$form->{dojo_theme}">
 
 <form name="form" method=post action=$form->{script}>
 

Modified: trunk/bin/ir.pl
===================================================================
--- trunk/bin/ir.pl	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/bin/ir.pl	2013-09-19 07:33:29 UTC (rev 6059)
@@ -83,7 +83,7 @@
     if ($form->{callback}){
         print "Location: $form->{callback}\n";
         print "Status: 302 Found\n\n";
-        print "<html><body>";
+        print "<html><body class="$form->{dojo_theme}">";
         my $url = $form->{callback};
         print qq|If you are not redirected automatically, click <a href="$url">|
                 . qq|here</a>.</body></html>|;
@@ -437,7 +437,7 @@
     $form->header;
 
     print qq|
-<body onLoad="document.forms[0].${focus}.focus()" />
+<body class="$form->{dojo_theme}" onLoad="document.forms[0].${focus}.focus()" />
 | . $form->open_status_div . qq|
 <script> 
 function on_return_submit(event){
@@ -1460,7 +1460,7 @@
 	    if ($form->{callback}){
 		print "Location: $form->{callback}\n";
 		print "Status: 302 Found\n\n";
-		print "<html><body>";
+		print "<html><body class="$form->{dojo_theme}">";
 		my $url = $form->{callback};
 		print qq|If you are not redirected automatically, click <a href="$url">|
 			. qq|here</a>.</body></html>|;

Modified: trunk/bin/is.pl
===================================================================
--- trunk/bin/is.pl	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/bin/is.pl	2013-09-19 07:33:29 UTC (rev 6059)
@@ -450,7 +450,7 @@
     $form->header;
 
     print qq|
-<body onLoad="document.forms[0].${focus}.focus()" /> 
+<body class="$form->{dojo_theme}" onLoad="document.forms[0].${focus}.focus()" /> 
 | . $form->open_status_div . qq|
 <script> 
 function on_return_submit(event){
@@ -1519,7 +1519,7 @@
 	    if ($form->{callback}){
 		print "Location: $form->{callback}\n";
 		print "Status: 302 Found\n\n";
-		print "<html><body>";
+		print qq|<html><body class="$form->{dojo_theme}">|;
 		my $url = $form->{callback};
 		print qq|If you are not redirected automatically, click <a href="$url">|
 			. qq|here</a>.</body></html>|;

Modified: trunk/bin/oe.pl
===================================================================
--- trunk/bin/oe.pl	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/bin/oe.pl	2013-09-19 07:33:29 UTC (rev 6059)
@@ -594,7 +594,7 @@
     $form->header;
 
     print qq|
-<body onLoad="document.forms[0].${focus}.focus()" />
+<body class="$form->{dojo_theme}" onLoad="document.forms[0].${focus}.focus()" />
 | . $form->open_status_div . qq|
 <script> 
 function on_return_submit(event){
@@ -1367,7 +1367,7 @@
     }
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 |;
@@ -1560,7 +1560,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 |;
@@ -1836,7 +1836,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -2129,7 +2129,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -2281,7 +2281,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -2535,7 +2535,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -2669,7 +2669,7 @@
     $form->header;
 
     print qq|
-<body onload="document.forms[0].vendor.focus()" />
+<body class="$form->{dojo_theme}" onload="document.forms[0].vendor.focus()" />
 
 <form method=post action=$form->{script}>
 

Modified: trunk/bin/pe.pl
===================================================================
--- trunk/bin/pe.pl	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/bin/pe.pl	2013-09-19 07:33:29 UTC (rev 6059)
@@ -108,7 +108,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -194,7 +194,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -292,7 +292,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 |;
@@ -398,7 +398,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <table width=100%>
   <tr>
@@ -538,7 +538,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -682,7 +682,7 @@
     $form->header;
     $title = $locale->text('Select from one of the names below');
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -886,7 +886,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -1065,7 +1065,7 @@
     $form->header;
 
     print qq|
-<body>
+<body class="$form->{dojo_theme}">
 
 <form method=post action=$form->{script}>
 
@@ -1189,7 +1189,7 @@
     $form->header;
 
     print qq|
-<body onLoad="document.forms[0].$form->{vc}.focus()" />
+<body class="$form->{dojo_theme}" onLoad="document.forms[0].$form->{vc}.focus()" />
 
 <form method=post action=$form->{script}>
 

Modified: trunk/old-handler.pl
===================================================================
--- trunk/old-handler.pl	2013-09-19 06:58:27 UTC (rev 6058)
+++ trunk/old-handler.pl	2013-09-19 07:33:29 UTC (rev 6059)
@@ -166,6 +166,7 @@
 
 # we get rid of myconfig and use User as a real object
 %myconfig = %{ LedgerSMB::User->fetch_config( $form ) };
+$form->{_myconfig} = \%myconfig;
 $LedgerSMB::App_State::User = \%myconfig;
 map { $form->{$_} = $myconfig{$_} } qw(stylesheet timeout)
   unless ( $form->{type} eq 'preferences' );

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits