Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var context_object;
- var d = new Date();
- var user_timezone = 'GMT'+ (-d.getTimezoneOffset()/60);
- setCookie('timezone', user_timezone);
- $(function(){
- $('body').append('<img id="main-loading" src="/'+versionDir+'images/cog.gif" alt=""/>');
- contextMenu();
- initTabs();
- initjQueryUi();
- initCompanySelect();
- $('.domk').live('keyup',function(){
- doMK(this);
- });
- $('a[href$="edit/Company"]').parent().remove();
- if($('.tabs .secondary').size() < 2){
- $('.tabs .secondary').remove();
- }
- $('.date_input').live('keyup',function(){
- doDate($(this));
- });
- $('.setl_date_input').live('keyup',function(){
- doDate($(this));
- });
- $('.icon-nav img').mouseenter(
- function(){
- jump($(this));
- }
- );
- $(".tooltip").tipTip();
- toolTips();
- $(document).ajaxStart(function(h) {
- showLoading();
- });
- $(document).ajaxStop(function() {
- toolTips();
- initjQueryUi();
- hideLoading();
- });
- inputDatePicker();
- function unloadPage(){
- showLoading();
- }
- window.onbeforeunload = unloadPage;
- $(document).ready(function(){
- //hideLoading();
- });
- $(document).keydown(function(e) {
- if (e.keyCode == 27) {
- Dialog.closeAll();
- }
- });
- });
- function inputDatePicker(){
- $('.date_input').live('click', function(){
- $(this).datepicker({
- constrainInput: false,
- showOn: 'focus',
- dateFormat: 'mm-dd-yy',
- beforeShowDay: function (date){
- for (i = 0; i < calendarEvents.length; i++) {
- if (date.getMonth() == calendarEvents[i][0] - 1
- && date.getDate() == calendarEvents[i][1]
- && (!calendarEvents[i][2] || date.getFullYear() == calendarEvents[i][2])) {
- return [false,"ui-state-active","Event Name"];
- }
- }
- return [true, ""];//enable all other days
- }
- }).focus();
- });
- $('.setl_date_input').live('click', function(){
- var startdate = null;
- if($('.window_forward').is(':checked') && $('#settlement_date_input_begin').val().length != 0){
- startdate = $('#settlement_date_input_begin').val();
- console.log(startdate);
- }
- $(this).datepicker({
- constrainInput: false,
- showOn: 'focus',
- dateFormat: 'mm-dd-yy',
- defaultDate: startdate,
- beforeShowDay: function (date){
- for (i = 0; i < calendarEvents.length; i++) {
- if (date.getMonth() == calendarEvents[i][0] - 1
- && date.getDate() == calendarEvents[i][1]
- && (!calendarEvents[i][2] || date.getFullYear() == calendarEvents[i][2])) {
- return [false,"ui-state-active","Event Name"];
- }
- }
- return [true, ""];//enable all other days
- }
- }).focus();
- });
- }
Add Comment
Please, Sign In to add comment