Sha256: 38affeb8710bec4ba274f569dfa21e0ff08da37dca0469cf95dae1e6007ea36d

Contents?: true

Size: 1.57 KB

Versions: 2

Compression:

Stored size: 1.57 KB

Contents

//= require jquery
//= require jquery_ujs
//= require tinymce-jquery
//= require cas/vendor/selectize.min
//= require_self

$(document).ready(function() {
  $("#select-site").on("change", function(e) {
    var url = $(this).val();
    window.location = url;
  });

  $(".js-tags").selectize({
    plugins: ['restore_on_backspace', 'remove_button'],
    delimiter: ',',
    persist: true,
    preload: false,
    render: {
      option_create: function(item, escape) {
        var input = item.input;
        return '<div class="create">' +
          (input ? '<span class="caption">Criar <b>' + escape(input) + '</b></span>' : '') +
          '</div>';
      },
    },
    create: function(input) {
      return {
        value: input,
        text: input
      }
    },
    onInitialize: function(){
      var selectize = this;
      var data = this.$input.data('autocomplete');
      selectize.addOption(data);
    }
  });

  tinyMCE.init({
    selector: 'textarea.editor',
    mode : "exact",
    relative_urls : false,
    convert_urls : 0, // default 1
    pagebreak_separator : '<br clear="all" class="pagebreak" />',
    height : '350',
    convert_fonts_to_spans : true,
    font_size_style_values : "8pt,10pt,12pt,14pt,18pt,24pt,36pt",
    inline_styles: false,
    extended_valid_elements: "embed,param,object,iframe[src|title|width|height|allowfullscreen|frameborder]",
    language : "pt_BR",
    plugins : 'image,imagetools,code,paste,pagebreak,table,wordcount,link',
    default_link_target: "_blank",
    images_upload_url: paths.fileUpload.path,
    images_upload_credentials: true
  });
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cas-cms-0.1.3 app/assets/javascripts/cas/application.js
cas-cms-0.1.2 app/assets/javascripts/cas/application.js