0

I am trying to do the save and apply button on luci2, as it is not developed by the main developer. I am keeping the reference of save function for this.

save: function()
{
    var self = this;

    if (self.options.readonly)
        return L.deferrable();

    var deferreds = [ ];

    for (var i = 0; i < self.sections.length; i++)
    {
        var rv = self.sections[i].save();
        deferreds.push.apply(deferreds, rv);
    }

    return $.when.apply($, deferreds).then(function() {
        return L.deferrable(self.options.save.call(self));
    });
},

Please someone can give me the idea to how to develop the "save and apply" function. With the above function it is working save function.I am keeping this as reference.

Any help will be appreciated.Thanks in advance.

Dennis Kriechel
  • 3,719
  • 14
  • 40
  • 62
Awanti
  • 109
  • 10

0 Answers0