Plugin Directory

Changeset 839285


Ignore:
Timestamp:
01/15/2014 09:32:22 PM (12 years ago)
Author:
jazzigor
Message:

Update trunk to v1.1

Location:
jazzy-forms/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • jazzy-forms/trunk/back/elements.js

    r830488 r839285  
    102102        element.delegate('.jzzf_option_delete', 'click', self.delete_option);
    103103        var smartid_element = element.find('.jzzf_element_name, .jzzf_element_title');
    104         smartid_element.bind('blur', 'change', name_update_listener);
     104        smartid_element.bind('blur', null, name_update_listener);
    105105        var smartid = new jzzf_smartid(id_helper, element);
    106106        smartid.bind();
  • jazzy-forms/trunk/back/gui.js

    r830488 r839285  
    2121        var obj = {
    2222            'title': title,
    23             'name': name,
     23            'name': '',
    2424            'type': type,
    2525            'decimals': 9,
     
    4040        var gui = jzzf_element.create(type, element_id_helper, adjust_email_tab, update_element_names);
    4141        gui.add(obj, remove ? item : null, false);
     42        update_element_names();
    4243        adjust_email_tab();
    4344    }
     
    106107            var name = id_helper.suggest_name(title);
    107108            data.title = title;
    108             data.name = name;
     109            data.name = '';//name;
    109110            jzzf_element.reset_ids(data);
    110111            element.add(data, placeholder, false);
     
    147148       
    148149        $('#jzzf_new_form_title').bind('change keyup', function() {
    149             $('#jzzf_title').val($('#jzzf_new_form_title').val()).change();
    150             return true;
     150            $('#jzzf_title').val($('#jzzf_new_form_title').val());
     151            $('#jzzf_title').trigger('jzzf_smartid_change');
     152            return false;
    151153        });
    152154        $('#jzzf_title').bind('change keyup', function() {
    153155            $('#jzzf_new_form_title').val($('#jzzf_title').val());
    154             return true;
     156            return false;
    155157        });
    156158
     
    265267    }
    266268   
     269    function default_email_parameters() {
     270        return {
     271            'sending': 'Sending...',
     272            'ok': "Message sent",
     273            'fail': "Can't send the message"
     274        };
     275    }
     276   
    267277    function add_form() {
    268278        switch_head(true);
     
    277287            'theme': 1,
    278288            'realtime': true,
    279             'email': {
    280                 'sending': 'Sending...',
    281                 'ok': "Message sent",
    282                 'fail': "Can't send the message"
    283             }
     289            'email': default_email_parameters()
    284290        };
    285291        elements = [];
     
    299305        form = jzzf_forms[idx];
    300306        form_index = idx;
     307        if(!form.email) {
     308            form.email = default_email_parameters();
     309        }
    301310        set_form(form);
    302311    }
  • jazzy-forms/trunk/back/smartid.js

    r830488 r839285  
    3535    this.bind = function() {
    3636        container.find('.jzzf_smartid').bind('change keyup', handle_id_change);
    37         container.find('.jzzf_smartid_source').bind("keyup change", handle_source_change);
     37        container.find('.jzzf_smartid_source').bind("keyup change jzzf_smartid_change", handle_source_change);
    3838        container.find('.jzzf_smartid, .jzzf_smartid_source').bind("focus", handle_focus);
    3939    }
  • jazzy-forms/trunk/core/Parser.php

    r587992 r839285  
    77concatenation = sum, [ "&", concatenation ];
    88sum = product, [("+" | "-"), sum];
    9 product = exponentiation, [("*" | "/"), term];
     9product = exponentiation, [("*" | "/"), product];
    1010exponentiation = negation, ["^", exponentiation];
    11 negation = ["-"], term
    12 term = negation | number | string | function | identifier | association;
     11negation = ["-"], percentage
     12percentage = term ["%"]
     13term = number | string | function | identifier | association;
    1314
    1415arguments = comparison, { ",", comparison };
     
    171172                return $num;
    172173            } else {
    173                 $positive = $this->term();
     174                $positive = $this->percentage();
    174175                    if(!$positive) {
    175176                    throw new Exception('missing negation operand');
     
    179180            }
    180181        } else {
    181             return $this->term();
    182         }
     182            return $this->percentage();
     183        }
     184    }
     185
     186    private function percentage() {
     187        $value = $this->term();
     188        if($this->ahead('%')) {
     189            if(!$value) {
     190                throw new Exception("Unexpected percentage sign");
     191            }
     192            $this->consume();
     193            if($value[0] == 'n') {
     194                $value[1] /= 100;
     195                return $value;
     196            } else {
     197                return array("o", "/", $value, array("n", 100));
     198            }
     199        }
     200        return $value;
    183201    }
    184202       
    185203    private function term() {
     204        //$this->dump();
    186205        if($this->complete()) {
    187206            return array();
     
    201220        return null;
    202221    }
     222   
     223    // for debugging only
     224    private function dump() {
     225        print json_encode($this->rest) . "\n";
     226    }
    203227}
  • jazzy-forms/trunk/core/Tokenizer.php

    r581482 r839285  
    3535           
    3636    private function operator() {
    37         return $this->match('<=|>=|<>|[\-\+\*\/\^\,<>=&]');
     37        return $this->match('<=|>=|<>|[\-\+\*\/\^\,<>=&%]');
    3838    }
    3939
  • jazzy-forms/trunk/front/jazzy-forms.js

    r830488 r839285  
    330330            case "r":
    331331                return element(id).find('input:checked').siblings("label").text();
     332            case "c":
     333                var box = element(id);
     334                return box.is(':checked') ? box.siblings("label").text() : "";
    332335            default:
    333336                types.raise_ref();
    334337        }
     338    }
     339   
     340    this.selected = function(id) {
     341        var type = graph.types[id];
     342        switch(type) {
     343            case "d":
     344                return element(id).find('option:selected').index() + 1;
     345            case "r":
     346                return element(id).find('input:checked').parent().index() + 1;
     347            case "c":
     348                return types.value(element(id).is(':checked')) ? 1 : 0;
     349            default:
     350                types.raise_ref();
     351        }
     352    }
     353   
     354    this.checked = function(id) {
     355        if(graph.types[id] != 'c') {
     356            types.raise_ref();
     357        }
     358        return element(id).is(':checked');
    335359    }
    336360   
     
    522546            var id = _id(args);
    523547            return engine.label(id);
    524         }
    525        
     548        },
     549        'selected': function(args) {
     550            var id = _id(args);
     551            return engine.selected(id);
     552        },
     553        'checked': function(args) {
     554            var id = _id(args);
     555            return engine.checked(id);
     556        }
    526557    };
    527558   
  • jazzy-forms/trunk/jazzy-forms.php

    r830488 r839285  
    44Plugin URI: http://www.jazzyforms.com/
    55Description: Online form builder with an emphasis on calculation
    6 Version: 1.0
     6Version: 1.1
    77Author: Igor Prochazka
    88Author URI: http://www.jazzyforms.com/
     
    1010---------------------------------------------------------------------
    1111    This file is part of the WordPress plugin "Jazzy Forms"
    12     Copyright (C) 2012, 2013 by Igor Prochazka
     12    Copyright (C) 2012-2014 by Igor Prochazka
    1313
    1414    This program is free software: you can redistribute it and/or modify
     
    2828*/
    2929
    30 define(JZZF_VERSION, 1.0000);
    31 define(JZZF_VERSION_STRING, "1.0000");
     30define(JZZF_VERSION, 1.0100);
     31define(JZZF_VERSION_STRING, "1.0100");
    3232define(JZZF_OPTION_VERSION, 'jzzf_version');
    3333
  • jazzy-forms/trunk/readme.txt

    r830488 r839285  
    55Requires at least: 3.2.1
    66Tested up to: 3.8
    7 Stable tag: 1.0
     7Stable tag: 1.1
    88
    99Online form builder, ideal for cost-estimates and calculations
     
    3636* Text/Heading/HTML
    3737
    38 Features like input validation, anti-spam measures or data collection are coming soon.
    39 
    4038[Official web site](http://www.jazzyforms.com/?utm_source=wordpress&utm_medium=plugin_directory&utm_term=&utm_content=&utm_campaign=official)
    4139
     
    120118
    121119== Changelog ==
     120
     121= 1.1 =
     122* Support for percentage notation
     123* Extend LABEL function to checkboxes
     124* SELECTED and CHECKED functions
     125* Several backend fixes
    122126
    123127= 1.0 =
Note: See TracChangeset for help on using the changeset viewer.