diff --git a/README.md b/README.md index 71e423934..aa4d4d1b5 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,9 @@ -# AngularJS ui-select [](https://travis-ci.org/angular-ui/ui-select) [](https://gitter.im/angular-ui/ui-select?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +# Fork of [AngularJS ui-select](https://github.com/angular-ui/ui-select) -AngularJS-native version of [Select2](http://ivaynberg.github.io/select2/) and [Selectize](http://brianreavis.github.io/selectize.js/). [http://angular-ui.github.io/ui-select/](http://angular-ui.github.io/ui-select/) +Шаблоны под materializecss.com - dist/materialize/ -[Getting Started](https://github.com/angular-ui/ui-select/wiki/Getting-Started) +Заблокированы шаблоны bootstrap, selectize, select2 -- [Examples](http://angular-ui.github.io/ui-select/#examples) -- [Examples Source](./docs/examples) -- [Documentation](https://github.com/angular-ui/ui-select/wiki) +Типовая разработка не пошла, поэтому тупо правка dist/select.js, потом вручную -## Latest Changes - -- Check [CHANGELOG.md](/CHANGELOG.md) - -## Features - -- Search, Select, Multi-select and Tagging -- Multiple Themes: Bootstrap, Select2 and Selectize -- Keyboard support -- No jQuery required (except for old browsers) -- Small code base: 4.57KB min/gzipped vs 20KB for select2 - -For the roadmap, check [issue #3](https://github.com/angular-ui/ui-select/issues/3) and the [Wiki page](https://github.com/angular-ui/ui-select/wiki/Roadmap). - -## Installation Methods - -### npm -``` -$ npm install ui-select -``` -### bower -``` -$ bower install angular-ui-select -``` - -## Development - -### Prepare your environment -* Install [Node.js](http://nodejs.org/) and NPM (should come with) -* Install global dev dependencies: `npm install -g gulp` -* Install local dev dependencies: `npm install` in repository directory - -### Development Commands - -* `gulp` to jshint, build and test -* `gulp build` to jshint and build -* `gulp test` for one-time test with karma (also build and jshint) -* `gulp watch` to watch src files to jshint, build and test when changed -* `gulp docs` build docs and examples - -## Contributing - -- Check [CONTRIBUTING.md](/CONTRIBUTING.md) -- Run the tests -- Try the [examples](./docs/examples) - -When issuing a pull request, please exclude changes from the "dist" folder to avoid merge conflicts. +`uglifyjs -v dist/select.js > dist/select.min.js` \ No newline at end of file diff --git a/dist/materialize.css b/dist/materialize.css new file mode 100644 index 000000000..20e97d57a --- /dev/null +++ b/dist/materialize.css @@ -0,0 +1,314 @@ + +/* Style when highlighting a search. */ +.ui-select-highlight { + font-weight: bold; +} + +.ui-select-offscreen { + clip: rect(0 0 0 0) !important; + width: 1px !important; + height: 1px !important; + border: 0 !important; + margin: 0 !important; + padding: 0 !important; + overflow: hidden !important; + position: absolute !important; + outline: 0 !important; + left: 0px !important; + top: 0px !important; +} + + +.ui-select-choices-row:hover { + background-color: #f5f5f5; +} + + +/* Bootstrap theme */ + +/* Helper class to show styles when focus */ +/*.btn-default-focus { + color: #333; + background-color: #EBEBEB; + border-color: #ADADAD; + text-decoration: none; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); +}*/ + +.ui-select-container {/* .ui-select-toggle*/ + position: relative; +} + +/*.ui-select-bootstrap .ui-select-toggle > .caret { + position: absolute; + height: 10px; + top: 50%; + right: 10px; + margin-top: -2px; +}*/ + +/* Fix Bootstrap dropdown position when inside a input-group */ +/*.input-group > .ui-select-bootstrap.dropdown { + position: static; +}*/ + +/*.input-group > .ui-select-bootstrap > input.ui-select-search.form-control { + border-radius: 4px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +}*/ +/*.input-group > .ui-select-bootstrap > input.ui-select-search.form-control.direction-up { + border-radius: 4px !important; + border-top-right-radius: 0 !important; + border-bottom-right-radius: 0 !important; +}*/ + +.ui-select-container .ui-select-search-hidden{ + opacity: 0; + height: 0; + min-height: 0; + padding: 0; + margin: 0; + border:0; +} + +/*.ui-select-bootstrap > .ui-select-match > .btn{ + text-align: left !important; +}*/ + +/*.ui-select-bootstrap > .ui-select-match > .caret { + position: absolute; + top: 45%; + right: 15px; +}*/ + +/* See Scrollable Menu with Bootstrap 3 http://stackoverflow.com/questions/19227496 */ +.ui-select-container > .ui-select-choices ,.ui-select-container > .ui-select-no-choice { + width: 100%; + height: auto; + max-height: 200px; + overflow-x: hidden; + margin-top: -1px; +} + +/*body > .ui-select-bootstrap.open {*/ +body > .ui-select-container.open { + z-index: 1000; /* Standard Bootstrap dropdown z-index */ +} + +.ui-select-multiple.ui-select-container { + height: auto; + padding: 3px 3px 0 3px; +} + +.ui-select-multiple.ui-select-container input.ui-select-search { + background-color: transparent !important; /* To prevent double background when disabled */ + border: none; + outline: none; + height: 1.666666em; + margin-bottom: 3px; +} + +/*.ui-select-multiple.ui-select-bootstrap .ui-select-match .close { + font-size: 1.6em; + line-height: 0.75; +}*/ + +.ui-select-multiple.ui-select-container .ui-select-match-item { + outline: 0; + margin: 0 3px 3px 0; +} + +.ui-select-multiple .ui-select-match-item { + position: relative; +} + +.ui-select-multiple .ui-select-match-item.dropping .ui-select-match-close { + pointer-events: none; +} + +.ui-select-multiple:hover .ui-select-match-item.dropping-before:before { + content: ""; + position: absolute; + top: 0; + right: 100%; + height: 100%; + margin-right: 2px; + border-left: 1px solid #428bca; +} + +.ui-select-multiple:hover .ui-select-match-item.dropping-after:after { + content: ""; + position: absolute; + top: 0; + left: 100%; + height: 100%; + margin-left: 2px; + border-right: 1px solid #428bca; +} + +.ui-select-container .ui-select-choices-row>span { + cursor: pointer; + display: block; + padding: 3px 20px; + clear: both; + font-weight: 400; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} + +.ui-select-container .ui-select-choices-row>span:hover, .ui-select-container .ui-select-choices-row>span:focus { + text-decoration: none; + color: #262626; + background-color: #f5f5f5; +} + +.ui-select-container .ui-select-choices-row.active>span { + color: #fff; + text-decoration: none; + outline: 0; + background-color: #428bca; +} + +.ui-select-container .ui-select-choices-row.disabled>span, +.ui-select-container .ui-select-choices-row.active.disabled>span { + color: #777; + cursor: not-allowed; + background-color: #fff; +} + +/* fix hide/show angular animation */ +.ui-select-match.ng-hide-add, +.ui-select-search.ng-hide-add { + display: none !important; +} + +/* Mark invalid Bootstrap */ +.ui-select-container.ng-dirty.ng-invalid > button.btn.ui-select-match { + border-color: #D44950; +} + +/* Handle up direction Bootstrap */ +/*.ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown { + box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); +}*/ + +.ui-select-match { + +} + +.ui-select-toggle { + display:inline-block; + /*width: 100%;*/ + overflow: hidden; + height: 3rem; + +} + +.ui-select-match .disabled { + /*color: grey;*/ + +} + +.ui-select-container .ui-select-match-text span { + /*display: inline-block; + width: 100%; + overflow: hidden;*/ +} +/*.ui-select-bootstrap .ui-select-toggle > a.btn { + position: absolute; + height: 10px; + right: 10px; + margin-top: -2px; +}*/ + + + +.ui-select-match-text{ + border-bottom: 1px solid; + /*display:inline-block;*/ + /*width: 100%;*/ + /*cursor:pointer;*/ +} + +/* copy-paste from the bootstrap.css */ + +/*.dropdown {*/ +.ui-select-container { + position: relative; +} + +/*.dropdown-menu {*/ +.ui-select-dropdown { + background-clip: padding-box; + background-color: #fff; + border: 1px solid rgba(0, 0, 0, 0.15); + /*border-radius: 4px;*/ + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); + display: none; + float: left; + /*font-size: 14px;*/ + left: 0; + list-style: outside none none; + margin: 2px 0 0; + min-width: 160px; + padding: 5px 0; + position: absolute; + top: 100%; + z-index: 1000; +} + + +/*.open > .dropdown-menu {*/ +.open > .ui-select-dropdown { + display: block; +} + +/* Spinner */ +/*.ui-select-refreshing { + position: absolute; + right: 0; + padding: 8px 27px; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing:antialiased; + } + +@-webkit-keyframes ui-select-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes ui-select-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} + +.ui-select-spin { + -webkit-animation: ui-select-spin 2s infinite linear; + animation: ui-select-spin 2s infinite linear; +} + +.ui-select-refreshing.ng-animate { + -webkit-animation: none 0s; +} + +*/ \ No newline at end of file diff --git a/dist/materialize.tpl.html b/dist/materialize.tpl.html new file mode 100644 index 000000000..7b79d180b --- /dev/null +++ b/dist/materialize.tpl.html @@ -0,0 +1,77 @@ +@@@ materialize/select.tpl.html + +