Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
3b14bee5
Commit
3b14bee5
authored
Oct 12, 2017
by
Alexander Zobnin
Committed by
Torkel Ödegaard
Oct 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tech: add backward compatibility for <spectrum-picker> directive (#9510)
parent
e7b718ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
public/app/core/components/colorpicker/spectrum_picker.ts
+23
-0
public/app/core/core.ts
+1
-0
No files found.
public/app/core/components/colorpicker/spectrum_picker.ts
0 → 100644
View file @
3b14bee5
/**
* Wrapper for the new ngReact <color-picker> directive for backward compatibility.
* Allows remaining <spectrum-picker> untouched in outdated plugins.
* Technically, it's just a wrapper for react component with two-way data binding support.
*/
import
coreModule
from
'../../core_module'
;
export
function
spectrumPicker
()
{
return
{
restrict
:
'E'
,
require
:
'ngModel'
,
scope
:
true
,
replace
:
true
,
template
:
'<color-picker color="ngModel.$viewValue" onChange="onColorChange"></color-picker>'
,
link
:
function
(
scope
,
element
,
attrs
,
ngModel
)
{
scope
.
ngModel
=
ngModel
;
scope
.
onColorChange
=
(
color
)
=>
{
ngModel
.
$setViewValue
(
color
);
};
}
};
}
coreModule
.
directive
(
'spectrumPicker'
,
spectrumPicker
);
public/app/core/core.ts
View file @
3b14bee5
...
...
@@ -17,6 +17,7 @@ import './components/code_editor/code_editor';
import
'./utils/outline'
;
import
'./components/colorpicker/ColorPicker'
;
import
'./components/colorpicker/SeriesColorPicker'
;
import
'./components/colorpicker/spectrum_picker'
;
import
{
grafanaAppDirective
}
from
'./components/grafana_app'
;
import
{
sideMenuDirective
}
from
'./components/sidemenu/sidemenu'
;
...
...
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