зеркало из https://github.com/mozilla/seasponge.git
Merge branch 'master' of github.com:mozilla/seasponge
This commit is contained in:
Коммит
d70b824c22
|
@ -11,10 +11,19 @@ angular.module('seaspongeApp')
|
||||||
.controller 'DrawController', ['$scope', 'Stencils', 'model', ($scope, Stencils, model) ->
|
.controller 'DrawController', ['$scope', 'Stencils', 'model', ($scope, Stencils, model) ->
|
||||||
|
|
||||||
console.log('model', model)
|
console.log('model', model)
|
||||||
|
|
||||||
$scope.model = model
|
$scope.model = model
|
||||||
|
|
||||||
$scope.stencils = Stencils
|
$scope.stencils = Stencils
|
||||||
|
$scope.stencilQuery = ''
|
||||||
|
$scope.filterFn = (query, values) ->
|
||||||
|
results = []
|
||||||
|
angular.forEach values, ((value, key) ->
|
||||||
|
@push value if value.title.toLowerCase().indexOf(query.toLowerCase()) isnt -1 or value.category.toLowerCase().indexOf(query.toLowerCase()) isnt -1
|
||||||
|
return
|
||||||
|
), results
|
||||||
|
if results.length > 0
|
||||||
|
results
|
||||||
|
else
|
||||||
|
values
|
||||||
|
|
||||||
$scope.menu = {
|
$scope.menu = {
|
||||||
infoOpen: false
|
infoOpen: false
|
||||||
|
|
|
@ -75,6 +75,11 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stencil-search {
|
||||||
|
width: 95% !important;
|
||||||
|
margin-left: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
// Shapes
|
// Shapes
|
||||||
.circle {
|
.circle {
|
||||||
width: 100px !important;
|
width: 100px !important;
|
||||||
|
|
|
@ -89,8 +89,8 @@
|
||||||
</accordion-heading>
|
</accordion-heading>
|
||||||
|
|
||||||
<div class="all-stencils row">
|
<div class="all-stencils row">
|
||||||
|
<input type="text" class="form-control stencil-search" ng-model="stencilQuery" placeholder="Search Stencils">
|
||||||
<div ng-repeat="stencil in stencils">
|
<div data-ng-repeat="stencil in filterFn(stencilQuery, stencils)">
|
||||||
<div class="stencil col-xs-6 col-md-4 col-lg-4"
|
<div class="stencil col-xs-6 col-md-4 col-lg-4"
|
||||||
draggable="true" data-drag="true" jqyoui-draggable ng-model="stencil"
|
draggable="true" data-drag="true" jqyoui-draggable ng-model="stencil"
|
||||||
data-jqyoui-options="{helper: 'clone', animate: true, placeholder: 'keep'}">
|
data-jqyoui-options="{helper: 'clone', animate: true, placeholder: 'keep'}">
|
||||||
|
|
Загрузка…
Ссылка в новой задаче