Loading app/assets/javascripts/ajax_gong.js +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ var AJAX_GONG = (function() { } opciones.hasOwnProperty('complete') && HERRAMIENTAS_GONG.cargando(opciones['complete']); HERRAMIENTAS_GONG.iniciarTooltip(); HERRAMIENTAS_GONG.activaSelectoresChosen(); }).fail( function(response, status) { error_div = jQuery("<div id='mensajeerror'>").html("ajax call failed:<br />" + status); jQuery("#ventana_dialog").html(error_div); Loading app/assets/javascripts/application.js +2 −1 Original line number Diff line number Diff line Loading @@ -10,8 +10,9 @@ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD // GO AFTER THE REQUIRES BELOW. // //= require jquery //= require jquery3 //= require jquery_ujs //= require jquery-ui //= require_tree . //= require tinymce //= require chosen-jquery app/assets/javascripts/herramientas_gong.js +18 −1 Original line number Diff line number Diff line var HERRAMIENTAS_GONG = (function() { var self = {}; self.activaSelectoresChosen = function() { var placeholder = jQuery("#selectchosen_data").data("placeholder"); var noResultText = jQuery("#selectchosen_data").data("no_results_text"); jQuery(".chosen_select").each( function(input) { $(this).data("placeholder", placeholder); // $(this).prepend("<option value=''></option>"); // $(this).removeClass("chosen_select"); $(this).chosen({width: '100%', allow_single_deselect: true, include_group_label_in_selected: true, no_results_text: noResultText, placeholder_text_single: placeholder}) }); }; self.iniciarTooltip = function(target, targetData){ target = typeof target !== 'undefined' ? target : ".help"; targetData = typeof targetData !== 'undefined' ? targetData : "title"; jQuery(target).tooltip({content: function () { return this.getAttribute(targetData); }}); } }; jQuery( document ).ready( function() { self.iniciarTooltip(); self.activaSelectoresChosen(); }); self.guardarbotonSubmit = function(opciones) { Loading app/assets/stylesheets/application.css +1 −0 Original line number Diff line number Diff line Loading @@ -11,4 +11,5 @@ *= require_self *= require_tree . *= require jquery-ui *= require chosen */ app/controllers/presupuesto_ingresos_controller.rb +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ class PresupuestoIngresosController < ApplicationController # AJAX para el cambio de financiador en el formulario de presupuestos def cambia_financiador datos_formulario render partial: "formulario_proyecto", locals: {reiniciar_javascript_chosen: true} render partial: "formulario_proyecto" end # AJAX para el cambio de financiador en el formulario de presupuestos Loading Loading
app/assets/javascripts/ajax_gong.js +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ var AJAX_GONG = (function() { } opciones.hasOwnProperty('complete') && HERRAMIENTAS_GONG.cargando(opciones['complete']); HERRAMIENTAS_GONG.iniciarTooltip(); HERRAMIENTAS_GONG.activaSelectoresChosen(); }).fail( function(response, status) { error_div = jQuery("<div id='mensajeerror'>").html("ajax call failed:<br />" + status); jQuery("#ventana_dialog").html(error_div); Loading
app/assets/javascripts/application.js +2 −1 Original line number Diff line number Diff line Loading @@ -10,8 +10,9 @@ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD // GO AFTER THE REQUIRES BELOW. // //= require jquery //= require jquery3 //= require jquery_ujs //= require jquery-ui //= require_tree . //= require tinymce //= require chosen-jquery
app/assets/javascripts/herramientas_gong.js +18 −1 Original line number Diff line number Diff line var HERRAMIENTAS_GONG = (function() { var self = {}; self.activaSelectoresChosen = function() { var placeholder = jQuery("#selectchosen_data").data("placeholder"); var noResultText = jQuery("#selectchosen_data").data("no_results_text"); jQuery(".chosen_select").each( function(input) { $(this).data("placeholder", placeholder); // $(this).prepend("<option value=''></option>"); // $(this).removeClass("chosen_select"); $(this).chosen({width: '100%', allow_single_deselect: true, include_group_label_in_selected: true, no_results_text: noResultText, placeholder_text_single: placeholder}) }); }; self.iniciarTooltip = function(target, targetData){ target = typeof target !== 'undefined' ? target : ".help"; targetData = typeof targetData !== 'undefined' ? targetData : "title"; jQuery(target).tooltip({content: function () { return this.getAttribute(targetData); }}); } }; jQuery( document ).ready( function() { self.iniciarTooltip(); self.activaSelectoresChosen(); }); self.guardarbotonSubmit = function(opciones) { Loading
app/assets/stylesheets/application.css +1 −0 Original line number Diff line number Diff line Loading @@ -11,4 +11,5 @@ *= require_self *= require_tree . *= require jquery-ui *= require chosen */
app/controllers/presupuesto_ingresos_controller.rb +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ class PresupuestoIngresosController < ApplicationController # AJAX para el cambio de financiador en el formulario de presupuestos def cambia_financiador datos_formulario render partial: "formulario_proyecto", locals: {reiniciar_javascript_chosen: true} render partial: "formulario_proyecto" end # AJAX para el cambio de financiador en el formulario de presupuestos Loading