-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from unicef-polymer/dropdown-in-modal
Dropdown in modal issues
- Loading branch information
Showing
7 changed files
with
86 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<link rel="import" href="../../polymer/polymer.html"> | ||
<link rel="import" href="../../etools-dialog/etools-dialog.html"> | ||
<link rel="import" href="../etools-searchable-multiselection-menu.html"> | ||
<link rel="import" href="../etools-single-selection-menu.html"> | ||
<link rel="import" href="../etools-multi-selection-menu.html"> | ||
|
||
<dom-module id="demo-in-modal"> | ||
<template> | ||
<style> | ||
</style> | ||
<button on-click="openDialog">Open Etools Dialog</button> | ||
<etools-dialog id="etoolsDialog" no-auto-focus="[[isIEBrowser()]]"> | ||
<h4>Single selection</h4> | ||
<etools-single-selection-menu options="[[realOptions]]" disable-on-focus-handling></etools-single-selection-menu> | ||
|
||
<h4>Multi selection</h4> | ||
<etools-multi-selection-menu options="[[realOptions]]" disable-on-focus-handling></etools-multi-selection-menu> | ||
|
||
<h4>Old esmm versions</h4> | ||
<etools-searchable-multiselection-menu options="[[realOptions]]"></etools-searchable-multiselection-menu> | ||
</etools-dialog> | ||
</template> | ||
<script> | ||
(function() { | ||
// jscs:disable | ||
'use strict'; | ||
|
||
Polymer({ | ||
is: 'demo-in-modal', | ||
|
||
properties: { | ||
realOptions: { | ||
type: Array, | ||
value: function() { | ||
var opt = []; | ||
for(var i = 1; i <= 25; i++) { | ||
opt.push({value: i, label: 'Option ' + i}); | ||
} | ||
return opt; | ||
}, | ||
notify: true | ||
}, | ||
}, | ||
openDialog: function() { | ||
this.$.etoolsDialog.opened = true; | ||
}, | ||
isIEBrowser: function() { | ||
let userAgent = window.navigator.userAgent; | ||
if (userAgent.indexOf('Trident/') > -1) { | ||
// IE 11 | ||
return true; | ||
} | ||
return false; | ||
} | ||
}); | ||
|
||
})(); | ||
</script> | ||
</dom-module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters