Skip to content

Instantly share code, notes, and snippets.

@A
Created August 28, 2014 09:34
Show Gist options
  • Select an option

  • Save A/6c57df4c024c82850136 to your computer and use it in GitHub Desktop.

Select an option

Save A/6c57df4c024c82850136 to your computer and use it in GitHub Desktop.
"dependencies": {
"async": "^0.9.0",
"backbone": "~1.1.2",
"backbone-undo": "^0.2.1", // Форкнул. Автор принял PR и я вернулся на официальную версию
"debounce": "0.0.3",
"extend": "~1.2.1",
"jade": "~0.35.0",
"jquery": "~2.1.0",
"jquery-form": "git://github.com/shuvalov-anton/form", // Форкнул, жду пока автор пример PR
"jquery-mousewheel": "~3.1.11",
"jquery-prevent-mac-back-scroll": "~0.1.0",
"jquery-ui": "~1.10.5",
"keyboardjs": "git://github.com/shuvalov-anton/KeyboardJS", // Форкнул, жду принятия PR. В оригинале есть баг с клавишами-модификаторами
"next-done": "~0.1.4", // Вынес код из проекта в небольшой модуль заменяющий async.js в простых ситуациях (покрыт тестами)
"nib": "~1.0.1",
"shortcode-params": "~1.0.1", // Небольшой модуль для фильтра
"simple-grid-stylys": "~0.1.2", // Вынес и немного упростил сетку (вариация на тему сетки из Bootstrap) в небольшой модуль
"stylus": "~0.41.3",
"underscore": "~1.6.0",
"util": "~0.10.1"
},
@mozib

mozib commented Aug 28, 2014

Copy link
Copy Markdown

I need help can you look at this code please !!

    <li class='customer'>

        <a href="#">

        <input type="checkbox" t-att-value="widget.model.get('tab_name')"/>
            <span class="customer-field customer-name">
                <t t-esc="widget.model.get('tab_name')"/>
            </span>
             <span class="customer-field customer-name">
                <t t-esc="widget.model.get('tab_size')"/>
            </span>             
         </a> 
    </li>

</t>

widget.js

module.CustomerWidget = module.PosBaseWidget.extend({
template: 'CustomerWidget',
init: function(parent, options) {
this._super(parent,options);
this.model = options.model;
this.click_customer_action = options.click_customer_action;

    },
    renderElement: function() {
        this._super();
        var self = this;
        $("a", this.$el).click(function(e)
        {
            if(self.click_customer_action){
                //self.click_customer_action(self.model.toJSON());
            }
        });
    },
});

Above code i want to save the date selected box table name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment