Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webmapsjs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glenn Vorhes
webmapsjs
Commits
74de7532
Commit
74de7532
authored
5 years ago
by
glennvorhes
Browse files
Options
Downloads
Patches
Plain Diff
add jquery helper
parent
2f7d73ba
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dist/reactComponents/DatePick.js
+1
-0
1 addition, 0 deletions
dist/reactComponents/DatePick.js
dist/reactComponents/DatePick.js.map
+1
-1
1 addition, 1 deletion
dist/reactComponents/DatePick.js.map
src/reactComponents/DatePick.tsx
+2
-1
2 additions, 1 deletion
src/reactComponents/DatePick.tsx
with
4 additions
and
2 deletions
dist/reactComponents/DatePick.js
+
1
−
0
View file @
74de7532
...
@@ -29,6 +29,7 @@ var __assign = (this && this.__assign) || function () {
...
@@ -29,6 +29,7 @@ var __assign = (this && this.__assign) || function () {
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
var
reactAndRedux_1
=
require
(
"
./reactAndRedux
"
);
var
reactAndRedux_1
=
require
(
"
./reactAndRedux
"
);
var
$
=
require
(
"
jquery
"
);
var
$
=
require
(
"
jquery
"
);
window
[
'
$
'
]
=
window
[
'
jQuery
'
]
=
$
;
// notice the definition of global variables here
require
(
"
jqueryui
"
);
require
(
"
jqueryui
"
);
var
makeGuid_1
=
require
(
"
../util/makeGuid
"
);
var
makeGuid_1
=
require
(
"
../util/makeGuid
"
);
var
dateFormat_1
=
require
(
"
./helpers/dateFormat
"
);
var
dateFormat_1
=
require
(
"
./helpers/dateFormat
"
);
...
...
This diff is collapsed.
Click to expand it.
dist/reactComponents/DatePick.js.map
+
1
−
1
View file @
74de7532
{"version":3,"file":"DatePick.js","sourceRoot":"","sources":["../../src/reactComponents/DatePick.tsx"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,iDAAsC;AACtC,0BAA6B;AAC7B,oBAAkB;AAClB,6CAAwC;AAGxC,mDAAgE;AAUhE;;GAEG;AACH;IAA8B,4BAAgC;IAG1D,kBAAY,KAAgB,EAAE,OAAe;QAA7C,YACI,kBAAM,KAAK,EAAE,OAAO,CAAC,SAExB;QADG,KAAI,CAAC,IAAI,GAAG,KAAI,CAAC,KAAK,CAAC,EAAE,IAAI,kBAAQ,EAAE,CAAC;;IAC5C,CAAC;IAED,oCAAiB,GAAjB;QAAA,iBAUC;QATG,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QAE7B,GAAG,CAAC,UAAU,CACV;YACI,QAAQ,EAAE;gBACN,KAAI,CAAC,KAAK,CAAC,MAAM,CAAC,yBAAY,CAAC,GAAG,CAAC,GAAG,EAAY,CAAC,CAAC,CAAC;YACzD,CAAC;SACJ,CACJ,CAAC;IACN,CAAC;IAED,yBAAM,GAAN;QACI,IAAI,MAAM,GAAG;YACT,EAAE,EAAE,IAAI,CAAC,IAAI;YACb,IAAI,EAAE,MAAM;YACZ,kDAAkD;YAClD,QAAQ,EAAE,IAAI;SACjB,CAAC;QAEF,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAC;YACf,MAAM,CAAC,OAAO,CAAC,GAAG,yBAAY,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SAClD;aAAM;YACH,MAAM,CAAC,cAAc,CAAC,GAAG,yBAAY,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;SAC/E;QAGD,OAAO,8CAAM,SAAS,EAAC,WAAW;YAC9B,+CAAO,OAAO,EAAE,IAAI,CAAC,IAAI,IAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAS;YAMrD,wDAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAC,IAAM,MAAM,EAAG,CACtF,CAAA;IACX,CAAC;IACL,eAAC;AAAD,CAAC,AA7CD,CAA8B,qBAAK,CAAC,SAAS,GA6C5C;AA7CY,4BAAQ;AA+CrB,kBAAe,QAAQ,CAAC","sourcesContent":["/**\r\n * Created by glenn on 6/14/2017.\r\n */\r\n\r\n\r\nimport {React} from './reactAndRedux';\r\nimport $ = require('jquery');\r\nimport 'jqueryui';\r\nimport makeGuid from '../util/makeGuid';\r\n\r\n\r\nimport {dateToString, stringToDate} from './helpers/dateFormat';\r\n\r\nexport interface iDatePick{\r\n label: string;\r\n id?: string;\r\n initialDate?: Date;\r\n change: (val: Date) => any;\r\n val?: Date\r\n}\r\n\r\n/**\r\n * params label, id, initialDate, change callback with value as string\r\n */\r\nexport class DatePick extends React.Component<iDatePick, null> {\r\n private elId: string;\r\n\r\n constructor(props: iDatePick, context: Object){\r\n super(props, context);\r\n this.elId = this.props.id || makeGuid();\r\n }\r\n\r\n componentDidMount() {\r\n let $el = $('#' + this.elId);\r\n\r\n $el.datepicker(\r\n {\r\n onSelect: () => {\r\n this.props.change(stringToDate($el.val() as string));\r\n }\r\n }\r\n );\r\n }\r\n\r\n render() {\r\n let params = {\r\n id: this.elId,\r\n type: 'text',\r\n // style: {margin: \"0 10px 0 5px\", width: '73px'},\r\n readOnly: true\r\n };\r\n\r\n if (this.props.val){\r\n params['value'] = dateToString(this.props.val);\r\n } else {\r\n params['defaultValue'] = dateToString(this.props.initialDate || new Date());\r\n }\r\n\r\n\r\n return <span className=\"date-pick\">\r\n <label htmlFor={this.elId}>{this.props.label}</label>\r\n {/*<input id={this.elId} type=\"text\"*/}\r\n {/*style={{margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center'}}*/}\r\n {/*defaultValue={dateToString(this.props.initialDate || new Date())}*/}\r\n {/*readOnly={true}*/}\r\n {/*/>*/}\r\n <input style={{textAlign: 'center', margin: \"0 10px 0 5px\", width: '73px'}} {...params}/>\r\n </span>\r\n }\r\n}\r\n\r\nexport default DatePick;"]}
{"version":3,"file":"DatePick.js","sourceRoot":"","sources":["../../src/reactComponents/DatePick.tsx"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,iDAAsC;AACtC,0BAA6B;AAC7B,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,iDAAiD;AACrF,oBAAkB;AAClB,6CAAwC;AAGxC,mDAAgE;AAUhE;;GAEG;AACH;IAA8B,4BAAgC;IAG1D,kBAAY,KAAgB,EAAE,OAAe;QAA7C,YACI,kBAAM,KAAK,EAAE,OAAO,CAAC,SAExB;QADG,KAAI,CAAC,IAAI,GAAG,KAAI,CAAC,KAAK,CAAC,EAAE,IAAI,kBAAQ,EAAE,CAAC;;IAC5C,CAAC;IAED,oCAAiB,GAAjB;QAAA,iBAUC;QATG,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QAE7B,GAAG,CAAC,UAAU,CACV;YACI,QAAQ,EAAE;gBACN,KAAI,CAAC,KAAK,CAAC,MAAM,CAAC,yBAAY,CAAC,GAAG,CAAC,GAAG,EAAY,CAAC,CAAC,CAAC;YACzD,CAAC;SACJ,CACJ,CAAC;IACN,CAAC;IAED,yBAAM,GAAN;QACI,IAAI,MAAM,GAAG;YACT,EAAE,EAAE,IAAI,CAAC,IAAI;YACb,IAAI,EAAE,MAAM;YACZ,kDAAkD;YAClD,QAAQ,EAAE,IAAI;SACjB,CAAC;QAEF,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAC;YACf,MAAM,CAAC,OAAO,CAAC,GAAG,yBAAY,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SAClD;aAAM;YACH,MAAM,CAAC,cAAc,CAAC,GAAG,yBAAY,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;SAC/E;QAGD,OAAO,8CAAM,SAAS,EAAC,WAAW;YAC9B,+CAAO,OAAO,EAAE,IAAI,CAAC,IAAI,IAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAS;YAMrD,wDAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAC,IAAM,MAAM,EAAG,CACtF,CAAA;IACX,CAAC;IACL,eAAC;AAAD,CAAC,AA7CD,CAA8B,qBAAK,CAAC,SAAS,GA6C5C;AA7CY,4BAAQ;AA+CrB,kBAAe,QAAQ,CAAC","sourcesContent":["/**\r\n * Created by glenn on 6/14/2017.\r\n */\r\n\r\n\r\nimport {React} from './reactAndRedux';\r\nimport $ = require(\"jquery\");\r\nwindow['$'] = window['jQuery'] = $; // notice the definition of global variables here\r\nimport 'jqueryui';\r\nimport makeGuid from '../util/makeGuid';\r\n\r\n\r\nimport {dateToString, stringToDate} from './helpers/dateFormat';\r\n\r\nexport interface iDatePick{\r\n label: string;\r\n id?: string;\r\n initialDate?: Date;\r\n change: (val: Date) => any;\r\n val?: Date\r\n}\r\n\r\n/**\r\n * params label, id, initialDate, change callback with value as string\r\n */\r\nexport class DatePick extends React.Component<iDatePick, null> {\r\n private elId: string;\r\n\r\n constructor(props: iDatePick, context: Object){\r\n super(props, context);\r\n this.elId = this.props.id || makeGuid();\r\n }\r\n\r\n componentDidMount() {\r\n let $el = $('#' + this.elId);\r\n\r\n $el.datepicker(\r\n {\r\n onSelect: () => {\r\n this.props.change(stringToDate($el.val() as string));\r\n }\r\n }\r\n );\r\n }\r\n\r\n render() {\r\n let params = {\r\n id: this.elId,\r\n type: 'text',\r\n // style: {margin: \"0 10px 0 5px\", width: '73px'},\r\n readOnly: true\r\n };\r\n\r\n if (this.props.val){\r\n params['value'] = dateToString(this.props.val);\r\n } else {\r\n params['defaultValue'] = dateToString(this.props.initialDate || new Date());\r\n }\r\n\r\n\r\n return <span className=\"date-pick\">\r\n <label htmlFor={this.elId}>{this.props.label}</label>\r\n {/*<input id={this.elId} type=\"text\"*/}\r\n {/*style={{margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center'}}*/}\r\n {/*defaultValue={dateToString(this.props.initialDate || new Date())}*/}\r\n {/*readOnly={true}*/}\r\n {/*/>*/}\r\n <input style={{textAlign: 'center', margin: \"0 10px 0 5px\", width: '73px'}} {...params}/>\r\n </span>\r\n }\r\n}\r\n\r\nexport default DatePick;"]}
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/reactComponents/DatePick.tsx
+
2
−
1
View file @
74de7532
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
import
{
React
}
from
'
./reactAndRedux
'
;
import
{
React
}
from
'
./reactAndRedux
'
;
import
$
=
require
(
'
jquery
'
);
import
$
=
require
(
"
jquery
"
);
window
[
'
$
'
]
=
window
[
'
jQuery
'
]
=
$
;
// notice the definition of global variables here
import
'
jqueryui
'
;
import
'
jqueryui
'
;
import
makeGuid
from
'
../util/makeGuid
'
;
import
makeGuid
from
'
../util/makeGuid
'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment