Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renamed 'skipHide' to 'multiple' #107

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ $scope.scopeVariable.options = {
| openOnInput | open-on-input | Boolean | true | Open color picker when user clicks on the input field. If disabled, color picker will only open when clicking on the preview. |
| hasBackdrop | has-backdrop | Boolean | true | Dialog Backdrop. https://material.angularjs.org/latest/api/service/$mdDialog |
| clickOutsideToClose | click-outside-to-close | Boolean | true | Dialog click outside to close. https://material.angularjs.org/latest/api/service/$mdDialog |
| skipHide | skip-hide | Boolean | true | Allows for opening multiple dialogs. https://github.com/angular/material/issues/7262 |
| multiple `(skipHide)` | multiple | Boolean | true | Allows for opening multiple dialogs. https://github.com/angular/material/issues/7262 |
| preserveScope | preserve-scope | Boolean | true | Dialog preserveScope. https://material.angularjs.org/latest/api/service/$mdDialog |
| clearButton | md-color-clear-button | Boolean | true | Show the "clear" button inside of the input. |
| preview | md-color-preview | Boolean | true | Show the color preview circle next to the input. |
Expand Down
73 changes: 42 additions & 31 deletions demo/js/app.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,47 @@
var app = angular.module('plunker', ['ngMaterial','ngCookies', 'mdColorPicker']);
var app = angular.module('plunker', ['ngMaterial', 'ngCookies', 'mdColorPicker']);

app.controller('MainCtrl', function($scope) {
app.controller('MainCtrl', function ($scope, $mdDialog) {
$scope.textConfig = {};
$scope.textConfig.fonts = [
'Arial',
'Arial Black',
'Comic Sans MS',
'Courier New',
'Georgia',
'Impact',
'Times New Roman',
'Trebuchet MS',
'Verdana'
];

$scope.textConfig.font;
$scope.textConfig.textColor;
$scope.textConfig.textBackground;

$scope.textConfig.backgroundOptions = {
label: "Text Background",
icon: "font_download",

hasBackdrop: true,
clickOutsideToClose: true,
random: true,
openOnInput: true,

alphaChannel: false,
history: false,
defaultTab: 1,
};
$scope.textConfig.showPreview = true;
'Arial',
'Arial Black',
'Comic Sans MS',
'Courier New',
'Georgia',
'Impact',
'Times New Roman',
'Trebuchet MS',
'Verdana'
];

$scope.textConfig.font;
$scope.textConfig.textColor;
$scope.textConfig.textBackground;

$scope.textConfig.backgroundOptions = {
label: "Text Background",
icon: "font_download",

hasBackdrop: true,
clickOutsideToClose: true,
random: true,
openOnInput: true,

alphaChannel: false,
history: false,
defaultTab: 1,
};
$scope.textConfig.showPreview = true;

$scope.openDialog = function (event) {
$mdDialog.show({
scope: $scope.$new(),
template: '<div style="padding: 10px 20px;"><div md-color-picker ng-model="textConfig.textColor" md-color-preview flex></div></div>',
parent: angular.element(document.body),
targetEvent: event,
clickOutsideToClose: true
});

}

});
Loading