mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#19111: Upgrade TimePicker addon to 1.0.5 http://trentrichardson.com/2012/10/08/timepicker-1-0-5-selected/
Work Item: 19111 --HG-- branch : 1.x
This commit is contained in:
@@ -55,7 +55,8 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Scripts\jquery-1.8.2.js" />
|
||||
<Content Include="Scripts\jquery-1.8.2.min.js" />
|
||||
<Content Include="Scripts\jquery.ui.timepicker.min.js" />
|
||||
<Content Include="Scripts\jquery-ui-sliderAccess.js" />
|
||||
<Content Include="Scripts\jquery-ui-timepicker-addon.js" />
|
||||
<Content Include="Scripts\jquery-ui.js" />
|
||||
<Content Include="Scripts\jquery-ui.min.js" />
|
||||
<Content Include="Scripts\jquery.effects.blind.js" />
|
||||
@@ -121,7 +122,6 @@
|
||||
<Content Include="Scripts\jquery.ui.widget.js" />
|
||||
<Content Include="Scripts\jquery.ui.widget.min.js" />
|
||||
<Content Include="Scripts\jquery.utils.js" />
|
||||
<Content Include="Scripts\jquery.ui.timepicker.js" />
|
||||
<Content Include="Styles\images\ui-bg_flat_0_aaaaaa_40x100.png" />
|
||||
<Content Include="Styles\images\ui-bg_flat_75_ffffff_40x100.png" />
|
||||
<Content Include="Styles\images\ui-bg_glass_55_fbf9ee_1x400.png" />
|
||||
@@ -136,8 +136,8 @@
|
||||
<Content Include="Styles\images\ui-icons_888888_256x240.png" />
|
||||
<Content Include="Styles\images\ui-icons_cd0a0a_256x240.png" />
|
||||
<Content Include="Styles\jquery-ui-1.8.23.custom.css" />
|
||||
<Content Include="Styles\jquery-ui-timepicker-addon.css" />
|
||||
<Content Include="Styles\ui.datepicker.css" />
|
||||
<Content Include="Styles\ui.timepicker.css" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
|
@@ -32,7 +32,8 @@ namespace Orchard.jQuery {
|
||||
manifest.DefineScript("jQueryUI_Slider").SetUrl("jquery.ui.slider.min.js", "jquery.ui.slider.js").SetVersion("1.8.23").SetDependencies("jQueryUI_Core", "jQueryUI_Widget", "jQueryUI_Mouse");
|
||||
manifest.DefineScript("jQueryUI_Tabs").SetUrl("jquery.ui.tabs.min.js", "jquery.ui.tabs.js").SetVersion("1.8.23").SetDependencies("jQueryUI_Core", "jQueryUI_Widget");
|
||||
manifest.DefineScript("jQueryUI_DatePicker").SetUrl("jquery.ui.datepicker.min.js", "jquery.ui.datepicker.js").SetVersion("1.8.23").SetDependencies("jQueryUI_Core");
|
||||
manifest.DefineScript("jQueryUI_TimePicker").SetUrl("jquery.ui.timepicker.min.js", "jquery.ui.timepicker.js").SetVersion("1.0.0").SetDependencies("jQueryUI_Slider", "jQueryUI_DatePicker");
|
||||
manifest.DefineScript("jQueryUI_SliderAccess").SetUrl("jquery-ui-sliderAccess.js").SetVersion("0.2").SetDependencies("jQueryUI_Core");
|
||||
manifest.DefineScript("jQueryUI_TimePicker").SetUrl("jquery-ui-timepicker-addon.js").SetVersion("1.0.5").SetDependencies("jQueryUI_Core", "jQueryUI_Slider", "jQueryUI_SliderAccess");
|
||||
manifest.DefineScript("jQueryUI_Progressbar").SetUrl("jquery.ui.progressbar.min.js", "jquery.ui.progressbar.js").SetVersion("1.8.23").SetDependencies("jQueryUI_Core", "jQueryUI_Widget");
|
||||
|
||||
// Effects
|
||||
@@ -55,7 +56,7 @@ namespace Orchard.jQuery {
|
||||
|
||||
manifest.DefineStyle("jQueryUI_Orchard").SetUrl("jquery-ui-1.8.23.custom.css").SetVersion("1.8.23");
|
||||
manifest.DefineStyle("jQueryUI_DatePicker").SetUrl("ui.datepicker.css").SetDependencies("jQueryUI_Orchard").SetVersion("1.7.2");
|
||||
manifest.DefineStyle("jQueryUI_TimePicker").SetUrl("ui.timepicker.css").SetDependencies("jQueryUI_DatePicker").SetVersion("1.0.0");
|
||||
manifest.DefineStyle("jQueryUI_TimePicker").SetUrl("jquery-ui-timepicker-addon.css").SetDependencies("jQueryUI_Orchard").SetVersion("1.0.5");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
86
src/Orchard.Web/Modules/Orchard.jQuery/Scripts/jquery-ui-sliderAccess.js
vendored
Normal file
86
src/Orchard.Web/Modules/Orchard.jQuery/Scripts/jquery-ui-sliderAccess.js
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* jQuery UI Slider Access
|
||||
* By: Trent Richardson [http://trentrichardson.com]
|
||||
* Version 0.2
|
||||
* Last Modified: 12/02/2011
|
||||
*
|
||||
* Copyright 2011 Trent Richardson
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
|
||||
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
|
||||
$.fn.extend({
|
||||
sliderAccess: function(options){
|
||||
options = options || {};
|
||||
options.touchonly = options.touchonly !== undefined? options.touchonly : true; // by default only show it if touch device
|
||||
|
||||
if(options.touchonly === true && !("ontouchend" in document))
|
||||
return $(this);
|
||||
|
||||
return $(this).each(function(i,obj){
|
||||
var $t = $(this),
|
||||
o = $.extend({},{
|
||||
where: 'after',
|
||||
step: $t.slider('option','step'),
|
||||
upIcon: 'ui-icon-plus',
|
||||
downIcon: 'ui-icon-minus',
|
||||
text: false,
|
||||
upText: '+',
|
||||
downText: '-',
|
||||
buttonset: true,
|
||||
buttonsetTag: 'span',
|
||||
isRTL: false
|
||||
}, options),
|
||||
$buttons = $('<'+ o.buttonsetTag +' class="ui-slider-access">'+
|
||||
'<button data-icon="'+ o.downIcon +'" data-step="'+ (o.isRTL? o.step : o.step*-1) +'">'+ o.downText +'</button>'+
|
||||
'<button data-icon="'+ o.upIcon +'" data-step="'+ (o.isRTL? o.step*-1 : o.step) +'">'+ o.upText +'</button>'+
|
||||
'</'+ o.buttonsetTag +'>');
|
||||
|
||||
$buttons.children('button').each(function(j, jobj){
|
||||
var $jt = $(this);
|
||||
$jt.button({
|
||||
text: o.text,
|
||||
icons: { primary: $jt.data('icon') }
|
||||
})
|
||||
.click(function(e){
|
||||
var step = $jt.data('step'),
|
||||
curr = $t.slider('value'),
|
||||
newval = curr += step*1,
|
||||
minval = $t.slider('option','min'),
|
||||
maxval = $t.slider('option','max');
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
if(newval < minval || newval > maxval)
|
||||
return;
|
||||
|
||||
$t.slider('value', newval);
|
||||
|
||||
$t.slider("option", "slide").call($t, null, { value: newval });
|
||||
});
|
||||
});
|
||||
|
||||
// before or after
|
||||
$t[o.where]($buttons);
|
||||
|
||||
if(o.buttonset){
|
||||
$buttons.removeClass('ui-corner-right').removeClass('ui-corner-left').buttonset();
|
||||
$buttons.eq(0).addClass('ui-corner-left');
|
||||
$buttons.eq(1).addClass('ui-corner-right');
|
||||
}
|
||||
|
||||
// adjust the width so we don't break the original layout
|
||||
var bOuterWidth = $buttons.css({
|
||||
marginLeft: ((o.where == 'after' && !o.isRTL) || (o.where == 'before' && o.isRTL)? 10:0),
|
||||
marginRight: ((o.where == 'before' && !o.isRTL) || (o.where == 'after' && o.isRTL)? 10:0)
|
||||
}).outerWidth(true) + 5;
|
||||
var tOuterWidth = $t.outerWidth(true);
|
||||
$t.css('display','inline-block').width(tOuterWidth-bOuterWidth);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
1831
src/Orchard.Web/Modules/Orchard.jQuery/Scripts/jquery-ui-timepicker-addon.js
vendored
Normal file
1831
src/Orchard.Web/Modules/Orchard.jQuery/Scripts/jquery-ui-timepicker-addon.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,7 +1,10 @@
|
||||
/* css for timepicker */
|
||||
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
||||
.ui-timepicker-div dl { text-align: left; }
|
||||
.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
|
||||
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
|
||||
.ui-timepicker-div td { font-size: 90%; }
|
||||
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
||||
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
||||
|
||||
.ui-timepicker-rtl{ direction: rtl; }
|
||||
.ui-timepicker-rtl dl { text-align: right; }
|
||||
.ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; }
|
@@ -35,7 +35,8 @@
|
||||
timeFormat: '@timeFormat',
|
||||
amNames: ['@cultureInfo.DateTimeFormat.AMDesignator', 'AM', 'A'],
|
||||
pmNames: ['@cultureInfo.DateTimeFormat.PMDesignator', 'PM', 'P'],
|
||||
ampm: @ampm
|
||||
ampm: @ampm,
|
||||
isRTL: @(cultureInfo.TextInfo.IsRightToLeft ? "true" : "false")
|
||||
};
|
||||
|
||||
$.timepicker.setDefaults($.timepicker.regional['']);
|
||||
|
Reference in New Issue
Block a user