Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
ff55b0a1
Commit
ff55b0a1
authored
4 years ago
by
prasad pawar
Committed by
nixonrodrigues
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Atlas-4062: UI:- Classification Daterange Picker Datetime format fix.
parent
10b6d142
master
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
138 additions
and
38 deletions
+138
-38
override.scss
dashboardv2/public/css/scss/override.scss
+8
-0
AddTimezoneView_tmpl.html
...boardv2/public/js/templates/tag/AddTimezoneView_tmpl.html
+6
-6
AddTagModalView.js
dashboardv2/public/js/views/tag/AddTagModalView.js
+33
-0
AddTimezoneItemView.js
dashboardv2/public/js/views/tag/AddTimezoneItemView.js
+22
-13
override.scss
dashboardv3/public/css/scss/override.scss
+8
-0
AddTimezoneView_tmpl.html
...boardv3/public/js/templates/tag/AddTimezoneView_tmpl.html
+6
-6
AddTagModalView.js
dashboardv3/public/js/views/tag/AddTagModalView.js
+33
-0
AddTimezoneItemView.js
dashboardv3/public/js/views/tag/AddTimezoneItemView.js
+22
-13
No files found.
dashboardv2/public/css/scss/override.scss
View file @
ff55b0a1
...
@@ -521,6 +521,14 @@ div.columnmanager-dropdown-container {
...
@@ -521,6 +521,14 @@ div.columnmanager-dropdown-container {
}
}
}
}
.modal
{
position
:
absolute
;
}
.modal-open
{
overflow-y
:
auto
;
}
.daterangepicker
{
.daterangepicker
{
max-height
:
400px
;
max-height
:
400px
;
overflow-y
:
scroll
;
overflow-y
:
scroll
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/templates/tag/AddTimezoneView_tmpl.html
View file @
ff55b0a1
...
@@ -16,16 +16,16 @@
...
@@ -16,16 +16,16 @@
-->
-->
<div
class=
"form-group clearfix"
>
<div
class=
"form-group clearfix"
>
<div
class=
"col-sm-4"
>
<div
class=
"col-sm-4"
>
<label
for=
""
>
Start Time
</label>
<label
class=
"col-sm-12 required"
for=
""
>
Start Time
</label>
<input
type=
"text"
class=
"form-control"
name=
"startTime"
data-id=
"startTime"
readonly
/>
<input
type=
"text"
class=
"form-control
start-time
"
name=
"startTime"
data-id=
"startTime"
readonly
/>
</div>
</div>
<div
class=
"col-sm-4"
>
<div
class=
"col-sm-4"
>
<label
for=
""
>
End Time
</label>
<label
class=
"col-sm-12 required"
for=
""
>
End Time
</label>
<input
type=
"text"
class=
"form-control"
name=
"endTime"
data-id=
"endTime"
readonly
/>
<input
type=
"text"
class=
"form-control
end-time
"
name=
"endTime"
data-id=
"endTime"
readonly
/>
</div>
</div>
<div
class=
"col-sm-3"
>
<div
class=
"col-sm-3"
>
<label
for=
""
>
TimeZone
</label>
<label
class=
"col-sm-12 required"
for=
""
>
TimeZone
</label>
<select
class=
"form-control row-margin-bottom"
data-id=
"timeZone"
required
>
<select
class=
"form-control row-margin-bottom
time-zone
"
data-id=
"timeZone"
required
>
</select>
</select>
</div>
</div>
<div
class=
"col-sm-1 attributePlusData"
align=
"right"
style=
"margin-top: 25px;"
>
<div
class=
"col-sm-1 attributePlusData"
align=
"right"
style=
"margin-top: 25px;"
>
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/AddTagModalView.js
View file @
ff55b0a1
...
@@ -136,6 +136,12 @@ define(['require',
...
@@ -136,6 +136,12 @@ define(['require',
this
.
modal
.
open
();
this
.
modal
.
open
();
this
.
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
true
);
this
.
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
true
);
this
.
on
(
'ok'
,
function
()
{
this
.
on
(
'ok'
,
function
()
{
if
(
this
.
validateValues
())
{
if
(
this
.
hideLoader
)
{
this
.
hideLoader
();
};
return
;
};
that
.
modal
.
$el
.
find
(
'button.ok'
).
showButtonLoader
();
that
.
modal
.
$el
.
find
(
'button.ok'
).
showButtonLoader
();
var
tagName
=
this
.
tagModel
?
this
.
tagModel
.
typeName
:
this
.
ui
.
addTagOptions
.
val
(),
var
tagName
=
this
.
tagModel
?
this
.
tagModel
.
typeName
:
this
.
ui
.
addTagOptions
.
val
(),
tagAttributes
=
{},
tagAttributes
=
{},
...
@@ -247,6 +253,33 @@ define(['require',
...
@@ -247,6 +253,33 @@ define(['require',
});
});
this
.
bindEvents
();
this
.
bindEvents
();
},
},
validateValues
:
function
(
attributeDefs
)
{
var
isValidate
=
true
,
applyErrorClass
=
function
(
scope
)
{
if
(
this
.
value
==
''
||
this
.
value
==
null
||
this
.
value
.
indexOf
(
'Select Timezone'
)
>
-
1
)
{
$
(
this
).
addClass
(
'errorValidate'
);
if
(
isValidate
)
{
isValidate
=
false
;
}
}
else
{
$
(
this
).
removeClass
(
'errorValidate'
);
}
};
this
.
$el
.
find
(
'.start-time'
).
each
(
function
(
element
)
{
applyErrorClass
.
call
(
this
);
});
this
.
$el
.
find
(
'.end-time'
).
each
(
function
(
element
)
{
applyErrorClass
.
call
(
this
);
});
this
.
$el
.
find
(
'.time-zone'
).
each
(
function
(
element
)
{
applyErrorClass
.
call
(
this
);
});
if
(
!
isValidate
)
{
Utils
.
notifyInfo
({
content
:
"Please fill the details"
});
return
true
;
}
},
onRender
:
function
()
{
onRender
:
function
()
{
var
that
=
this
;
var
that
=
this
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/AddTimezoneItemView.js
View file @
ff55b0a1
...
@@ -47,11 +47,11 @@ define(['require',
...
@@ -47,11 +47,11 @@ define(['require',
var
events
=
{},
var
events
=
{},
that
=
this
;
that
=
this
;
events
[
"change "
+
this
.
ui
.
startTime
]
=
function
(
e
)
{
events
[
"change "
+
this
.
ui
.
startTime
]
=
function
(
e
)
{
this
.
model
.
set
({
"startTime"
:
th
is
.
ui
.
startTime
.
val
(
)
});
this
.
model
.
set
({
"startTime"
:
th
at
.
getDateFormat
(
this
.
ui
.
startTime
.
val
()
)
});
this
.
buttonActive
({
isButtonActive
:
true
});
this
.
buttonActive
({
isButtonActive
:
true
});
};
};
events
[
"change "
+
this
.
ui
.
endTime
]
=
function
(
e
)
{
events
[
"change "
+
this
.
ui
.
endTime
]
=
function
(
e
)
{
this
.
model
.
set
({
"endTime"
:
th
is
.
ui
.
endTime
.
val
(
)
});
this
.
model
.
set
({
"endTime"
:
th
at
.
getDateFormat
(
this
.
ui
.
endTime
.
val
()
)
});
this
.
buttonActive
({
isButtonActive
:
true
});
this
.
buttonActive
({
isButtonActive
:
true
});
};
};
events
[
"change "
+
this
.
ui
.
timeZone
]
=
function
(
e
)
{
events
[
"change "
+
this
.
ui
.
timeZone
]
=
function
(
e
)
{
...
@@ -76,7 +76,7 @@ define(['require',
...
@@ -76,7 +76,7 @@ define(['require',
"singleDatePicker"
:
true
,
"singleDatePicker"
:
true
,
"showDropdowns"
:
true
,
"showDropdowns"
:
true
,
"timePicker"
:
true
,
"timePicker"
:
true
,
"timePicker24Hour"
:
true
,
"timePicker24Hour"
:
Globals
.
dateTimeFormat
.
indexOf
(
"hh"
)
>
-
1
?
false
:
true
,
"timePickerSeconds"
:
true
,
"timePickerSeconds"
:
true
,
"startDate"
:
new
Date
(),
"startDate"
:
new
Date
(),
"autoApply"
:
true
,
"autoApply"
:
true
,
...
@@ -99,38 +99,47 @@ define(['require',
...
@@ -99,38 +99,47 @@ define(['require',
startDateObj
[
"autoUpdateInput"
]
=
false
;
startDateObj
[
"autoUpdateInput"
]
=
false
;
}
else
{
}
else
{
startDateObj
[
"autoUpdateInput"
]
=
true
;
startDateObj
[
"autoUpdateInput"
]
=
true
;
startDateObj
[
"startDate"
]
=
this
.
model
.
get
(
'startTime'
);
startDateObj
[
"startDate"
]
=
Utils
.
formatDate
({
date
:
Date
.
parse
(
this
.
model
.
get
(
'startTime'
)),
zone
:
false
}
);
}
}
if
(
_
.
isEmpty
(
this
.
model
.
get
(
'endTime'
)))
{
if
(
_
.
isEmpty
(
this
.
model
.
get
(
'endTime'
)))
{
endDateObj
[
"autoUpdateInput"
]
=
false
;
endDateObj
[
"autoUpdateInput"
]
=
false
;
endDateObj
[
"minDate"
]
=
this
.
model
.
get
(
'startTime'
);
endDateObj
[
"minDate"
]
=
Utils
.
formatDate
({
date
:
Date
.
parse
(
this
.
model
.
get
(
'startTime'
)),
zone
:
false
}
);
}
else
{
}
else
{
endDateObj
[
"autoUpdateInput"
]
=
true
;
endDateObj
[
"autoUpdateInput"
]
=
true
;
endDateObj
[
"minDate"
]
=
this
.
model
.
get
(
'startTime'
);
endDateObj
[
"minDate"
]
=
Utils
.
formatDate
({
date
:
Date
.
parse
(
this
.
model
.
get
(
'startTime'
)),
zone
:
false
}
);
endDateObj
[
"startDate"
]
=
this
.
model
.
get
(
'endTime'
);
endDateObj
[
"startDate"
]
=
Utils
.
formatDate
({
date
:
Date
.
parse
(
this
.
model
.
get
(
'endTime'
)),
zone
:
false
}
);
}
}
if
(
!
_
.
isEmpty
(
this
.
model
.
get
(
'timeZone'
)))
{
if
(
!
_
.
isEmpty
(
this
.
model
.
get
(
'timeZone'
)))
{
this
.
ui
.
timeZone
.
val
(
this
.
model
.
get
(
'timeZone'
)).
trigger
(
"change"
,
{
'manual'
:
true
});
this
.
ui
.
timeZone
.
val
(
this
.
model
.
get
(
'timeZone'
)).
trigger
(
"change"
,
{
'manual'
:
true
});
}
}
}
else
{
}
else
{
this
.
model
.
set
(
'startTime'
,
that
.
ui
.
startTime
.
val
(
));
this
.
model
.
set
(
'startTime'
,
that
.
getDateFormat
(
that
.
ui
.
startTime
.
val
()
));
this
.
model
.
set
(
'endTime'
,
that
.
ui
.
endTime
.
val
(
));
this
.
model
.
set
(
'endTime'
,
that
.
getDateFormat
(
that
.
ui
.
endTime
.
val
()
));
}
}
this
.
ui
.
startTime
.
daterangepicker
(
startDateObj
).
on
(
'apply.daterangepicker'
,
function
(
ev
,
picker
)
{
this
.
ui
.
startTime
.
daterangepicker
(
startDateObj
).
on
(
'apply.daterangepicker'
,
function
(
ev
,
picker
)
{
that
.
ui
.
startTime
.
val
(
Utils
.
formatDate
({
date
:
picker
.
startDate
,
zone
:
false
}));
that
.
ui
.
startTime
.
val
(
Utils
.
formatDate
({
date
:
picker
.
startDate
,
zone
:
false
}));
_
.
extend
(
endDateObj
,
{
"minDate"
:
that
.
ui
.
startTime
.
val
()
})
_
.
extend
(
endDateObj
,
{
"minDate"
:
that
.
ui
.
startTime
.
val
()
})
that
.
endDateInitialize
(
endDateObj
);
that
.
endDateInitialize
(
endDateObj
);
that
.
model
.
set
(
'startTime'
,
that
.
ui
.
startTime
.
val
(
));
that
.
model
.
set
(
'startTime'
,
that
.
getDateFormat
(
that
.
ui
.
startTime
.
val
()
));
that
.
buttonActive
({
isButtonActive
:
true
});
that
.
buttonActive
({
isButtonActive
:
true
});
}).
on
(
'cancel.daterangepicker'
,
function
(
ev
,
picker
)
{
}).
on
(
'cancel.daterangepicker'
,
function
(
ev
,
picker
)
{
that
.
ui
.
startTime
.
val
(
''
);
that
.
ui
.
startTime
.
val
(
''
);
delete
endDateObj
.
minDate
;
delete
endDateObj
.
minDate
;
that
.
endDateInitialize
(
endDateObj
);
that
.
endDateInitialize
(
endDateObj
);
that
.
model
.
set
(
'startTime'
,
that
.
ui
.
startTime
.
val
(
));
that
.
model
.
set
(
'startTime'
,
that
.
getDateFormat
(
that
.
ui
.
startTime
.
val
()
));
});
});
this
.
endDateInitialize
(
endDateObj
);
this
.
endDateInitialize
(
endDateObj
);
this
.
buttonActive
({
isButtonActive
:
true
});
this
.
buttonActive
({
isButtonActive
:
true
});
},
},
getDateFormat
:
function
(
option
)
{
if
(
option
&&
option
.
length
)
{
if
(
Globals
.
dateTimeFormat
.
indexOf
(
"HH"
)
>
-
1
)
{
option
=
option
.
slice
(
0
,
-
3
);
// remove AM/PM from 24hr format
}
return
moment
(
Date
.
parse
(
option
)).
format
(
'YYYY/MM/DD HH:mm:ss'
);
}
return
""
;
},
buttonActive
:
function
(
option
)
{
buttonActive
:
function
(
option
)
{
var
that
=
this
;
var
that
=
this
;
if
(
option
&&
option
.
isButtonActive
&&
that
.
tagModel
)
{
if
(
option
&&
option
.
isButtonActive
&&
that
.
tagModel
)
{
...
@@ -154,11 +163,11 @@ define(['require',
...
@@ -154,11 +163,11 @@ define(['require',
var
that
=
this
;
var
that
=
this
;
this
.
ui
.
endTime
.
daterangepicker
(
option
).
on
(
'apply.daterangepicker'
,
function
(
ev
,
picker
)
{
this
.
ui
.
endTime
.
daterangepicker
(
option
).
on
(
'apply.daterangepicker'
,
function
(
ev
,
picker
)
{
that
.
ui
.
endTime
.
val
(
Utils
.
formatDate
({
date
:
picker
.
startDate
,
zone
:
false
}));
that
.
ui
.
endTime
.
val
(
Utils
.
formatDate
({
date
:
picker
.
startDate
,
zone
:
false
}));
that
.
model
.
set
(
'endTime'
,
that
.
ui
.
endTime
.
val
(
));
that
.
model
.
set
(
'endTime'
,
that
.
getDateFormat
(
that
.
ui
.
endTime
.
val
()
));
that
.
buttonActive
({
isButtonActive
:
true
});
that
.
buttonActive
({
isButtonActive
:
true
});
}).
on
(
'cancel.daterangepicker'
,
function
(
ev
,
picker
)
{
}).
on
(
'cancel.daterangepicker'
,
function
(
ev
,
picker
)
{
that
.
ui
.
endTime
.
val
(
''
);
that
.
ui
.
endTime
.
val
(
''
);
that
.
model
.
set
(
'endTime'
,
that
.
ui
.
endTime
.
val
(
));
that
.
model
.
set
(
'endTime'
,
that
.
getDateFormat
(
that
.
ui
.
endTime
.
val
()
));
});
});
}
}
});
});
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/css/scss/override.scss
View file @
ff55b0a1
...
@@ -525,6 +525,14 @@ div.columnmanager-dropdown-container {
...
@@ -525,6 +525,14 @@ div.columnmanager-dropdown-container {
}
}
}
}
.modal
{
position
:
absolute
;
}
.modal-open
{
overflow-y
:
auto
;
}
.daterangepicker
{
.daterangepicker
{
.ranges
{
.ranges
{
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/templates/tag/AddTimezoneView_tmpl.html
View file @
ff55b0a1
...
@@ -16,16 +16,16 @@
...
@@ -16,16 +16,16 @@
-->
-->
<div
class=
"form-group clearfix"
>
<div
class=
"form-group clearfix"
>
<div
class=
"col-sm-4"
>
<div
class=
"col-sm-4"
>
<label
for=
""
>
Start Time
</label>
<label
class=
"col-sm-12 required"
for=
""
>
Start Time
</label>
<input
type=
"text"
class=
"form-control"
name=
"startTime"
data-id=
"startTime"
readonly
/>
<input
type=
"text"
class=
"form-control
start-time
"
name=
"startTime"
data-id=
"startTime"
readonly
/>
</div>
</div>
<div
class=
"col-sm-4"
>
<div
class=
"col-sm-4"
>
<label
for=
""
>
End Time
</label>
<label
class=
"col-sm-12 required"
for=
""
>
End Time
</label>
<input
type=
"text"
class=
"form-control"
name=
"endTime"
data-id=
"endTime"
readonly
/>
<input
type=
"text"
class=
"form-control
end-time
"
name=
"endTime"
data-id=
"endTime"
readonly
/>
</div>
</div>
<div
class=
"col-sm-3"
>
<div
class=
"col-sm-3"
>
<label
for=
""
>
TimeZone
</label>
<label
class=
"col-sm-12 required"
for=
""
>
TimeZone
</label>
<select
class=
"form-control row-margin-bottom"
data-id=
"timeZone"
required
>
<select
class=
"form-control row-margin-bottom
time-zone
"
data-id=
"timeZone"
required
>
</select>
</select>
</div>
</div>
<div
class=
"col-sm-1 attributePlusData"
align=
"right"
style=
"margin-top: 25px;"
>
<div
class=
"col-sm-1 attributePlusData"
align=
"right"
style=
"margin-top: 25px;"
>
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/tag/AddTagModalView.js
View file @
ff55b0a1
...
@@ -136,6 +136,12 @@ define(['require',
...
@@ -136,6 +136,12 @@ define(['require',
this
.
modal
.
open
();
this
.
modal
.
open
();
this
.
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
true
);
this
.
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
true
);
this
.
on
(
'ok'
,
function
()
{
this
.
on
(
'ok'
,
function
()
{
if
(
this
.
validateValues
())
{
if
(
this
.
hideLoader
)
{
this
.
hideLoader
();
};
return
;
};
that
.
modal
.
$el
.
find
(
'button.ok'
).
showButtonLoader
();
that
.
modal
.
$el
.
find
(
'button.ok'
).
showButtonLoader
();
var
tagName
=
this
.
tagModel
?
this
.
tagModel
.
typeName
:
this
.
ui
.
addTagOptions
.
val
(),
var
tagName
=
this
.
tagModel
?
this
.
tagModel
.
typeName
:
this
.
ui
.
addTagOptions
.
val
(),
tagAttributes
=
{},
tagAttributes
=
{},
...
@@ -247,6 +253,33 @@ define(['require',
...
@@ -247,6 +253,33 @@ define(['require',
});
});
this
.
bindEvents
();
this
.
bindEvents
();
},
},
validateValues
:
function
(
attributeDefs
)
{
var
isValidate
=
true
,
applyErrorClass
=
function
(
scope
)
{
if
(
this
.
value
==
''
||
this
.
value
==
null
||
this
.
value
.
indexOf
(
'Select Timezone'
)
>
-
1
)
{
$
(
this
).
addClass
(
'errorValidate'
);
if
(
isValidate
)
{
isValidate
=
false
;
}
}
else
{
$
(
this
).
removeClass
(
'errorValidate'
);
}
};
this
.
$el
.
find
(
'.start-time'
).
each
(
function
(
element
)
{
applyErrorClass
.
call
(
this
);
});
this
.
$el
.
find
(
'.end-time'
).
each
(
function
(
element
)
{
applyErrorClass
.
call
(
this
);
});
this
.
$el
.
find
(
'.time-zone'
).
each
(
function
(
element
)
{
applyErrorClass
.
call
(
this
);
});
if
(
!
isValidate
)
{
Utils
.
notifyInfo
({
content
:
"Please fill the details"
});
return
true
;
}
},
onRender
:
function
()
{
onRender
:
function
()
{
var
that
=
this
;
var
that
=
this
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/tag/AddTimezoneItemView.js
View file @
ff55b0a1
...
@@ -47,11 +47,11 @@ define(['require',
...
@@ -47,11 +47,11 @@ define(['require',
var
events
=
{},
var
events
=
{},
that
=
this
;
that
=
this
;
events
[
"change "
+
this
.
ui
.
startTime
]
=
function
(
e
)
{
events
[
"change "
+
this
.
ui
.
startTime
]
=
function
(
e
)
{
this
.
model
.
set
({
"startTime"
:
th
is
.
ui
.
startTime
.
val
(
)
});
this
.
model
.
set
({
"startTime"
:
th
at
.
getDateFormat
(
this
.
ui
.
startTime
.
val
()
)
});
this
.
buttonActive
({
isButtonActive
:
true
});
this
.
buttonActive
({
isButtonActive
:
true
});
};
};
events
[
"change "
+
this
.
ui
.
endTime
]
=
function
(
e
)
{
events
[
"change "
+
this
.
ui
.
endTime
]
=
function
(
e
)
{
this
.
model
.
set
({
"endTime"
:
th
is
.
ui
.
endTime
.
val
(
)
});
this
.
model
.
set
({
"endTime"
:
th
at
.
getDateFormat
(
this
.
ui
.
endTime
.
val
()
)
});
this
.
buttonActive
({
isButtonActive
:
true
});
this
.
buttonActive
({
isButtonActive
:
true
});
};
};
events
[
"change "
+
this
.
ui
.
timeZone
]
=
function
(
e
)
{
events
[
"change "
+
this
.
ui
.
timeZone
]
=
function
(
e
)
{
...
@@ -76,7 +76,7 @@ define(['require',
...
@@ -76,7 +76,7 @@ define(['require',
"singleDatePicker"
:
true
,
"singleDatePicker"
:
true
,
"showDropdowns"
:
true
,
"showDropdowns"
:
true
,
"timePicker"
:
true
,
"timePicker"
:
true
,
"timePicker24Hour"
:
true
,
"timePicker24Hour"
:
Globals
.
dateTimeFormat
.
indexOf
(
"hh"
)
>
-
1
?
false
:
true
,
"timePickerSeconds"
:
true
,
"timePickerSeconds"
:
true
,
"startDate"
:
new
Date
(),
"startDate"
:
new
Date
(),
"autoApply"
:
true
,
"autoApply"
:
true
,
...
@@ -99,38 +99,47 @@ define(['require',
...
@@ -99,38 +99,47 @@ define(['require',
startDateObj
[
"autoUpdateInput"
]
=
false
;
startDateObj
[
"autoUpdateInput"
]
=
false
;
}
else
{
}
else
{
startDateObj
[
"autoUpdateInput"
]
=
true
;
startDateObj
[
"autoUpdateInput"
]
=
true
;
startDateObj
[
"startDate"
]
=
this
.
model
.
get
(
'startTime'
);
startDateObj
[
"startDate"
]
=
Utils
.
formatDate
({
date
:
Date
.
parse
(
this
.
model
.
get
(
'startTime'
)),
zone
:
false
}
);
}
}
if
(
_
.
isEmpty
(
this
.
model
.
get
(
'endTime'
)))
{
if
(
_
.
isEmpty
(
this
.
model
.
get
(
'endTime'
)))
{
endDateObj
[
"autoUpdateInput"
]
=
false
;
endDateObj
[
"autoUpdateInput"
]
=
false
;
endDateObj
[
"minDate"
]
=
this
.
model
.
get
(
'startTime'
);
endDateObj
[
"minDate"
]
=
Utils
.
formatDate
({
date
:
Date
.
parse
(
this
.
model
.
get
(
'startTime'
)),
zone
:
false
}
);
}
else
{
}
else
{
endDateObj
[
"autoUpdateInput"
]
=
true
;
endDateObj
[
"autoUpdateInput"
]
=
true
;
endDateObj
[
"minDate"
]
=
this
.
model
.
get
(
'startTime'
);
endDateObj
[
"minDate"
]
=
Utils
.
formatDate
({
date
:
Date
.
parse
(
this
.
model
.
get
(
'startTime'
)),
zone
:
false
}
);
endDateObj
[
"startDate"
]
=
this
.
model
.
get
(
'endTime'
);
endDateObj
[
"startDate"
]
=
Utils
.
formatDate
({
date
:
Date
.
parse
(
this
.
model
.
get
(
'endTime'
)),
zone
:
false
}
);
}
}
if
(
!
_
.
isEmpty
(
this
.
model
.
get
(
'timeZone'
)))
{
if
(
!
_
.
isEmpty
(
this
.
model
.
get
(
'timeZone'
)))
{
this
.
ui
.
timeZone
.
val
(
this
.
model
.
get
(
'timeZone'
)).
trigger
(
"change"
,
{
'manual'
:
true
});
this
.
ui
.
timeZone
.
val
(
this
.
model
.
get
(
'timeZone'
)).
trigger
(
"change"
,
{
'manual'
:
true
});
}
}
}
else
{
}
else
{
this
.
model
.
set
(
'startTime'
,
that
.
ui
.
startTime
.
val
(
));
this
.
model
.
set
(
'startTime'
,
that
.
getDateFormat
(
that
.
ui
.
startTime
.
val
()
));
this
.
model
.
set
(
'endTime'
,
that
.
ui
.
endTime
.
val
(
));
this
.
model
.
set
(
'endTime'
,
that
.
getDateFormat
(
that
.
ui
.
endTime
.
val
()
));
}
}
this
.
ui
.
startTime
.
daterangepicker
(
startDateObj
).
on
(
'apply.daterangepicker'
,
function
(
ev
,
picker
)
{
this
.
ui
.
startTime
.
daterangepicker
(
startDateObj
).
on
(
'apply.daterangepicker'
,
function
(
ev
,
picker
)
{
that
.
ui
.
startTime
.
val
(
Utils
.
formatDate
({
date
:
picker
.
startDate
,
zone
:
false
}));
that
.
ui
.
startTime
.
val
(
Utils
.
formatDate
({
date
:
picker
.
startDate
,
zone
:
false
}));
_
.
extend
(
endDateObj
,
{
"minDate"
:
that
.
ui
.
startTime
.
val
()
})
_
.
extend
(
endDateObj
,
{
"minDate"
:
that
.
ui
.
startTime
.
val
()
})
that
.
endDateInitialize
(
endDateObj
);
that
.
endDateInitialize
(
endDateObj
);
that
.
model
.
set
(
'startTime'
,
that
.
ui
.
startTime
.
val
(
));
that
.
model
.
set
(
'startTime'
,
that
.
getDateFormat
(
that
.
ui
.
startTime
.
val
()
));
that
.
buttonActive
({
isButtonActive
:
true
});
that
.
buttonActive
({
isButtonActive
:
true
});
}).
on
(
'cancel.daterangepicker'
,
function
(
ev
,
picker
)
{
}).
on
(
'cancel.daterangepicker'
,
function
(
ev
,
picker
)
{
that
.
ui
.
startTime
.
val
(
''
);
that
.
ui
.
startTime
.
val
(
''
);
delete
endDateObj
.
minDate
;
delete
endDateObj
.
minDate
;
that
.
endDateInitialize
(
endDateObj
);
that
.
endDateInitialize
(
endDateObj
);
that
.
model
.
set
(
'startTime'
,
that
.
ui
.
startTime
.
val
(
));
that
.
model
.
set
(
'startTime'
,
that
.
getDateFormat
(
that
.
ui
.
startTime
.
val
()
));
});
});
this
.
endDateInitialize
(
endDateObj
);
this
.
endDateInitialize
(
endDateObj
);
this
.
buttonActive
({
isButtonActive
:
true
});
this
.
buttonActive
({
isButtonActive
:
true
});
},
},
getDateFormat
:
function
(
option
)
{
if
(
option
&&
option
.
length
)
{
if
(
Globals
.
dateTimeFormat
.
indexOf
(
"HH"
)
>
-
1
)
{
option
=
option
.
slice
(
0
,
-
3
);
// remove AM/PM from 24hr format
}
return
moment
(
Date
.
parse
(
option
)).
format
(
'YYYY/MM/DD HH:mm:ss'
);
}
return
""
;
},
buttonActive
:
function
(
option
)
{
buttonActive
:
function
(
option
)
{
var
that
=
this
;
var
that
=
this
;
if
(
option
&&
option
.
isButtonActive
&&
that
.
tagModel
)
{
if
(
option
&&
option
.
isButtonActive
&&
that
.
tagModel
)
{
...
@@ -154,11 +163,11 @@ define(['require',
...
@@ -154,11 +163,11 @@ define(['require',
var
that
=
this
;
var
that
=
this
;
this
.
ui
.
endTime
.
daterangepicker
(
option
).
on
(
'apply.daterangepicker'
,
function
(
ev
,
picker
)
{
this
.
ui
.
endTime
.
daterangepicker
(
option
).
on
(
'apply.daterangepicker'
,
function
(
ev
,
picker
)
{
that
.
ui
.
endTime
.
val
(
Utils
.
formatDate
({
date
:
picker
.
startDate
,
zone
:
false
}));
that
.
ui
.
endTime
.
val
(
Utils
.
formatDate
({
date
:
picker
.
startDate
,
zone
:
false
}));
that
.
model
.
set
(
'endTime'
,
that
.
ui
.
endTime
.
val
(
));
that
.
model
.
set
(
'endTime'
,
that
.
getDateFormat
(
that
.
ui
.
endTime
.
val
()
));
that
.
buttonActive
({
isButtonActive
:
true
});
that
.
buttonActive
({
isButtonActive
:
true
});
}).
on
(
'cancel.daterangepicker'
,
function
(
ev
,
picker
)
{
}).
on
(
'cancel.daterangepicker'
,
function
(
ev
,
picker
)
{
that
.
ui
.
endTime
.
val
(
''
);
that
.
ui
.
endTime
.
val
(
''
);
that
.
model
.
set
(
'endTime'
,
that
.
ui
.
endTime
.
val
(
));
that
.
model
.
set
(
'endTime'
,
that
.
getDateFormat
(
that
.
ui
.
endTime
.
val
()
));
});
});
}
}
});
});
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment