Sha256: 85ff8b545abcffe60a52a9c4755e8ff0367cf2017a752f337d3af048064c5f7a

Contents?: true

Size: 1.7 KB

Versions: 50

Compression:

Stored size: 1.7 KB

Contents

I"Ã(function() {
  this.Quby = {};

  Quby.Models = {};

  Quby.Collections = {};

  Quby.Views = {};

  Quby.Logic = {};

  Quby.Components = {};

  $(function() {
    Quby.questions = new Quby.Collections.Questions;
    Quby.panels = new Quby.Collections.Panels;
    return Quby.flags = new Quby.Collections.Flags;
  });

  Quby.init = function(options) {
    Quby.questionnaire_key = options.questionnaire_key;
    Quby.flags.addFlags(options.flag_definitions, options.flag_values);
    Quby.answer = new Quby.Models.Answer(options.answer_value);
    Quby.initTextvars(options.textvars);
    Quby.initShowsHides();
    return Quby.initFieldListeners();
  };

  Quby.initTextvars = function(textvars) {
    Quby.textvars = new Quby.Collections.Textvars(textvars);
    $("span[textvar]").each(function(idx, elm) {
      var textvar;
      textvar = elm.getAttribute('textvar');
      return React.renderComponent(Quby.Components.Textvar({
        textvar: textvar
      }), elm);
    });
    $(document).on("change", "input[sets_textvar]", function() {
      return Quby.textvars.set(this.getAttribute("sets_textvar"), this.value);
    });
    return $("input[sets_textvar][value][value!=\"\"]").trigger("change");
  };

  Quby.initShowsHides = function() {
    Quby.questions.trigger("initShowsHides");
    return Quby.flags.initShowsHides(Quby.questions);
  };

  Quby.initFieldListeners = function() {
    return $("select[data-field-key], input[data-field-key], textarea[data-field-key]").on("change", function(event) {
      var fieldKey, fieldValue;
      fieldKey = $(event.target).data("field-key");
      fieldValue = event.target.value;
      return Quby.answer.setField(fieldKey, fieldValue);
    });
  };

}).call(this);
:ET

Version data entries

50 entries across 29 versions & 1 rubygems

Version Path
quby-5.6.5 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.6.3 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.6.0 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.5.0 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.3.0 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.2.0 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.1.3 spec/internal/tmp/cache/assets/test/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.1.3 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.1.2 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.1.2 spec/internal/tmp/cache/assets/test/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.1.1 spec/internal/tmp/cache/assets/sprockets/v3.0/fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.1.1 spec/internal/tmp/cache/assets/test/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.1.0 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.1.0 spec/internal/tmp/cache/assets/test/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.0.5 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.0.5 spec/internal/tmp/cache/assets/test/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.0.4 spec/internal/tmp/cache/assets/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.0.4 spec/internal/tmp/cache/assets/test/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.0.3 spec/internal/tmp/cache/assets/sprockets/v3.0/fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache
quby-5.0.2 spec/internal/tmp/cache/assets/test/sprockets/v3.0/Fk/FktBFDgCcuY7-WHve5tjMKBJQbkFH9-yaAm0ndixqcM.cache