[Rt-commit] rt branch, lcore, updated. 25bdc4ae88a087446a8ef9c67ca338ed1ddd77d2

clkao at bestpractical.com clkao at bestpractical.com
Mon Oct 19 08:00:47 EDT 2009


The branch, lcore has been updated
       via  25bdc4ae88a087446a8ef9c67ca338ed1ddd77d2 (commit)
       via  7e7bac9afcaa675d94a334e7aaa02e149fcba1d7 (commit)
       via  cfaf72e72f408645e5ddf376a267d6bcf3f2acd9 (commit)
      from  0300109500b65660acf108c5a2bb4ab9cd776873 (commit)

Summary of changes:
 lib/RT/Lorzy.pm                    |   23 +++++++++++++++++++++++
 share/web/static/js/rulebuilder.js |    9 ++++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit cfaf72e72f408645e5ddf376a267d6bcf3f2acd9
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Mon Oct 19 19:45:26 2009 +0800

    stub parameter holders for update actions.

diff --git a/lib/RT/Lorzy.pm b/lib/RT/Lorzy.pm
index 253a582..d124004 100644
--- a/lib/RT/Lorzy.pm
+++ b/lib/RT/Lorzy.pm
@@ -75,6 +75,18 @@ sub install_model_accessors {
     my ($env, $model) = @_;
     my $modelname = lc($model);
     $modelname =~ s/.*://;
+
+
+    $env->set_symbol($model.'.Update' => LCore::Primitive->new
+                         ( body => sub {
+                               my @params = @_;
+                               die 'not yet';
+                           },
+                           parameters => [
+                               LCore::Parameter->new({ name => 'params', type => "ArrayRef[${model}Param]" }) ],
+                           return_type => 'Any',
+                       ));
+
     for my $column ($model->columns) {
         next if $column->virtual;
         my $name = $column->name;
@@ -98,6 +110,17 @@ sub install_model_accessors {
                                parameters => [ LCore::Parameter->new({ name => $modelname, type => $model }) ],
                                return_type => $type
                            ));
+
+        $env->set_symbol($model.'Param.'.$name => LCore::Primitive->new
+                             ( body => sub {
+                                   my ($object) = @_;
+                                   die 'not yet';
+                               },
+                               parameters => [ LCore::Parameter->new({ name => $name, type => $type }) ],
+                               return_type => $model.'Param',
+                           ));
+
+
     }
 }
 

commit 7e7bac9afcaa675d94a334e7aaa02e149fcba1d7
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Mon Oct 19 19:49:30 2009 +0800

    add 'show all' option to function list.

diff --git a/share/web/static/js/rulebuilder.js b/share/web/static/js/rulebuilder.js
index 5768f41..89bec7b 100644
--- a/share/web/static/js/rulebuilder.js
+++ b/share/web/static/js/rulebuilder.js
@@ -125,6 +125,11 @@ RuleBuilder.prototype.init = function () {
 
     functions_div = jQuery('.functions');
     functions_div.append('<h3>Functions</h3>');
+    jQuery._span_({ 'class': 'showall'})
+        .text("show all...")
+        .click(function(e) {
+            jQuery('.functions .function', ebuilder).removeClass('unmatched');
+        }).appendTo(functions_div);
     jQuery.each(this.functions,
                 function(key, val) {
                     functions_div.append('<div class="function ret_'+val.return_type+'"> <span class="return-type">'+val.return_type+'</span> <span class="function-name">'+key+'</span>'+render_signature(val.parameters).html() +'</div>');

commit 25bdc4ae88a087446a8ef9c67ca338ed1ddd77d2
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Mon Oct 19 19:50:05 2009 +0800

    allow entering values for Int.

diff --git a/share/web/static/js/rulebuilder.js b/share/web/static/js/rulebuilder.js
index 89bec7b..4a119d1 100644
--- a/share/web/static/js/rulebuilder.js
+++ b/share/web/static/js/rulebuilder.js
@@ -498,7 +498,9 @@ Module("RuleBuilder2", function(m) {
                     .text(expected_type)
                     .appendTo(this.element);
 
-                if (expected_type == 'Str' || expected_type == 'Num') { // self-evaluating
+                if (expected_type == 'Str' ||
+                    expected_type == 'Num' ||
+                    expected_type == 'Int') { // self-evaluating
                     jQuery._span_({ 'class': 'enter-value' })
                         .text("Enter a value")
                         .click(function(e) {

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


More information about the Rt-commit mailing list