mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #3748: Update slider change event to 'change.fndtn.slider'
This commit is contained in:
parent
a03fb3525e
commit
6f776f6381
@ -257,7 +257,7 @@ define(function(require) {
|
||||
|
||||
$( ".cardinality_slider", context).foundation('slider', 'set_value', role_template.cardinality);
|
||||
|
||||
$( ".cardinality_slider", context).on('change', function(){
|
||||
$( ".cardinality_slider", context).on('change.fndtn.slider', function(){
|
||||
$(".cardinality_value",context).html($(this).attr('data-slider'))
|
||||
var cost_value = $(".provision_create_service_cost_div", context).data("cost")*$(this).attr('data-slider');
|
||||
$(".cost_value", context).html(cost_value.toFixed(2));
|
||||
@ -1908,11 +1908,16 @@ define(function(require) {
|
||||
ProvisionQuotaWidget.setup(context);
|
||||
|
||||
// Workaround to fix sliders. Apparently the setup fails while they are hidden
|
||||
$('a[href="#provision_create_user_manual_quota"]', context).on("click", function(){
|
||||
context.on('click', 'a[href="#provision_create_user_manual_quota"]', function(){
|
||||
$(".provision_rvms_quota_input", context).change();
|
||||
$(".provision_memory_quota_input", context).change();
|
||||
$(".provision_memory_quota_tmp_input", context).change();
|
||||
$(".provision_cpu_quota_input", context).change();
|
||||
|
||||
// Workaround until hidden Foundation.slider can be initialized
|
||||
setInterval(function() {
|
||||
context.foundation('slider', 'reflow');
|
||||
}, 20);
|
||||
});
|
||||
|
||||
$("#provision_create_user").submit(function(){
|
||||
|
@ -459,7 +459,7 @@ define(function(require) {
|
||||
$( ".cardinality_no_slider_div", context).hide();
|
||||
|
||||
$( ".cardinality_slider", context).foundation('slider', 'set_value', role.cardinality);
|
||||
$( ".cardinality_slider", context).on('change', function(){
|
||||
$( ".cardinality_slider", context).on('change.fndtn.slider', function(){
|
||||
$(".cardinality_value",context).html($(this).attr('data-slider'))
|
||||
});
|
||||
} else {
|
||||
|
@ -9,7 +9,6 @@ define(function(require) {
|
||||
}
|
||||
|
||||
function setup_provision_quota_widget(context) {
|
||||
context.foundation('reflow', 'slider');
|
||||
// Mode selector, for the 3 sliders
|
||||
$("select.provision_quota_select", context).on('change', function() {
|
||||
var row = $(this).closest(".row");
|
||||
@ -44,7 +43,7 @@ define(function(require) {
|
||||
|
||||
var provision_rvms_quota_input = $(".provision_rvms_quota_input", context);
|
||||
|
||||
$(".provision_rvms_quota_slider", context).on('change', function() {
|
||||
$(".provision_rvms_quota_slider", context).on('change.fndtn.slider', function() {
|
||||
provision_rvms_quota_input.val($(this).attr('data-slider'))
|
||||
});
|
||||
|
||||
@ -55,7 +54,7 @@ define(function(require) {
|
||||
|
||||
var provision_cpu_quota_input = $(".provision_cpu_quota_input", context);
|
||||
|
||||
$(".provision_cpu_quota_slider", context).on('change', function() {
|
||||
$(".provision_cpu_quota_slider", context).on('change.fndtn.slider', function() {
|
||||
provision_cpu_quota_input.val($(this).attr('data-slider'))
|
||||
});
|
||||
|
||||
@ -76,7 +75,7 @@ define(function(require) {
|
||||
}
|
||||
}
|
||||
|
||||
$(".provision_memory_quota_slider", context).on('change', function() {
|
||||
$(".provision_memory_quota_slider", context).on('change.fndtn.slider', function() {
|
||||
provision_memory_quota_tmp_input.val($(this).attr('data-slider'));
|
||||
update_final_memory_input();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user