[freeside-commits] branch master updated. 671846c7bee35093d62a467236dddfe4706520b3

Ivan ivan at 420.am
Thu Oct 11 15:16:01 PDT 2012


The branch, master has been updated
       via  671846c7bee35093d62a467236dddfe4706520b3 (commit)
       via  47e67d9852be3ccab87d2993f063e920295d8e65 (commit)
       via  490a84555bf376fdee7a8be49f1658c906913d78 (commit)
      from  4c886d5b7b118382dd021636ecb3de2ce275e7c1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 671846c7bee35093d62a467236dddfe4706520b3
Merge: 47e67d9 4c886d5
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Oct 11 15:15:48 2012 -0700

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


commit 47e67d9852be3ccab87d2993f063e920295d8e65
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Oct 5 18:18:34 2012 -0700

    fix sort of routers (and hardware type, it looks like)

diff --git a/httemplate/elements/select-tiered.html b/httemplate/elements/select-tiered.html
index 7a7982e..e332eef 100644
--- a/httemplate/elements/select-tiered.html
+++ b/httemplate/elements/select-tiered.html
@@ -59,7 +59,11 @@ main argument list, and will be applied to the last tier.
   >
 %   if ( $i == 0 ) {
 %     my $options = $tiers_by_key->[0]->{''};
-%     foreach ( sort keys %$options ) {
+%     #foreach ( sort keys %$options ) {
+%     foreach ( sort { lc($options->{$a}) cmp lc($options->{$b}) }
+%                 keys %$options
+%             )
+%     {
   <OPTION VALUE="<%$_ |h%>" <% $curr_values->[$i] eq $_ ? 'SELECTED' : ''%>>
   <% $options->{$_} |h%></OPTION>
 %     }

commit 490a84555bf376fdee7a8be49f1658c906913d78
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Oct 5 18:01:40 2012 -0700

    work around wacky JSON autoload problem, fallout from #16266 plus probably a JSON vs Mason bug?

diff --git a/httemplate/elements/select-tiered.html b/httemplate/elements/select-tiered.html
index 99b2852..7a7982e 100644
--- a/httemplate/elements/select-tiered.html
+++ b/httemplate/elements/select-tiered.html
@@ -68,8 +68,8 @@ main argument list, and will be applied to the last tier.
 </SELECT>
 <% $tier->{after} %>
 % } #foreach $tier
+
 <SCRIPT type="text/javascript">
-% my $json = JSON->new->canonical; #sort
 var <% $pre %>tiers = <% $json->encode($tiers_by_key) %>;
 var <% $pre %>curr_values = <% $json->encode($curr_values) %>;
 function <% $pre %>select_change(select_this, i) {
@@ -120,6 +120,16 @@ my %opt = @_;
 my $pre = $opt{prefix} || '';
 my $tiers = $opt{tiers} or die "no tiers defined";
 
+#my $json = JSON->new()->canonical(); #sort
+# something super weird and broken going on with JSON's auto-loading, just
+# using JSON alone errors out with
+#   Can't locate object method "new" via package "null" (perhaps you forgot to
+#   load "null"?)
+# yes, "null", not "JSON".  so instead, using JSON::XS explicity...
+use JSON::XS;
+my $json = JSON::XS->new();
+$json->canonical;
+
 my $i;
 for( $i = 0; $i < @$tiers; $i++ ) {
   my $tier = $tiers->[$i];

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/select-tiered.html |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list