Commit 16cd8eab authored by hadi's avatar hadi
Browse files
parents 8c56b01b 633537a2
Pipeline #13009443 failed with stage
in 11 minutes and 5 seconds
......@@ -12,6 +12,7 @@
# Eclipse
.settings
.project
.tern-project
# KDE
.directory
......
{
"name": "angular-material-weburger-common",
"version": "0.2.2",
"version": "0.2.3",
"authors": [
"Mostafa Barmshory <mostafa.barmshory@dpq.co.ir>",
"Hadi mansouri <mohammad.hadi.mansouri@dpq.co.ir>",
......@@ -19,7 +19,7 @@
"dist/angular-material-weburger-common.css"
],
"dependencies": {
"angular-material-weburger": "^0.2.2"
"angular-material-weburger": "https://gitlab.com/weburger/angular-material-weburger.git#^0.2.2"
},
"devDependencies": {
"angular-mocks": "^1.6.0"
......
......@@ -13,11 +13,14 @@
<link rel="stylesheet" href="bower_components/md-color-picker/dist/mdColorPicker.min.css" />
<link rel="stylesheet" href="bower_components/angular-material-expansion-panel/dist/md-expansion-panel.css" />
<link rel="stylesheet" href="bower_components/angular-material-icons/angular-material-icons.css" />
<link rel="stylesheet" href="bower_components/pikaday/css/pikaday.css" />
<link rel="stylesheet" href="bower_components/handsontable/dist/handsontable.css" />
<link rel="stylesheet" href="bower_components/angular-material-weburger/dist/angular-material-weburger.css" />
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(.tmp) styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="styles/feature-list.css">
<link rel="stylesheet" href="styles/main-demo.css">
<!-- endbuild -->
</head>
......@@ -69,9 +72,6 @@
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/moment/moment.js"></script>
<script src="bower_components/moment-jalaali/build/moment-jalaali.js"></script>
<script src="bower_components/angular-pluf/dist/angular-pluf.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-aria/angular-aria.js"></script>
<script src="bower_components/angular-messages/angular-messages.js"></script>
......@@ -85,6 +85,12 @@
<script src="bower_components/angular-material-expansion-panel/dist/md-expansion-panel.js"></script>
<script src="bower_components/angular-material-icons/angular-material-icons.min.js"></script>
<script src="bower_components/weakmap-polyfill/weakmap-polyfill.js"></script>
<script src="bower_components/moment/moment.js"></script>
<script src="bower_components/numbro/numbro.js"></script>
<script src="bower_components/pikaday/pikaday.js"></script>
<script src="bower_components/zeroclipboard/dist/ZeroClipboard.js"></script>
<script src="bower_components/handsontable/dist/handsontable.js"></script>
<script src="bower_components/ngHandsontable/dist/ngHandsontable.js"></script>
<script src="bower_components/angular-material-weburger/dist/angular-material-weburger.js"></script>
<!-- endbower -->
<!-- endbuild -->
......
......@@ -25,7 +25,7 @@
//Test controller
angular.module('MyTestModule', ['ngMaterialWeburgerCommon'])
.controller('MyTestCtrl', function($scope, $http, $mdDialog, $usr){
.controller('MyTestCtrl', function($scope, $http){
$http.get('temp.json')//
.then(function (res){
$scope.model = res.data;
......
......@@ -60,7 +60,7 @@
"icon": "assignment_turned_in",
"title": "Home",
"text": "Feature description.",
"image": "home",
"image": "/images/logo.svg",
"action": {
"type": "link",
"link": "https://gitlab.com/weburger/am-wb-common",
......@@ -69,25 +69,9 @@
},
{
"icon": "assignment_turned_in",
"title": "Favorite items",
"title": "Feature title",
"text": "Feature description.",
"image": "favorite",
"action": {
"type": "link",
"link": "https://gitlab.com/weburger/am-wb-common/wikis/toolbar",
"label": "faivorite"
}
},
{
"icon": "assignment_turned_in",
"title": "Contact us",
"text": "Feature description.",
"image": "phone",
"action": {
"type": "link",
"link": "http://dpq.co.ir",
"label": "DPQ home"
}
"image": "/images/logo.svg"
}
],
"label": "Common widgets",
......@@ -243,7 +227,7 @@
"setting": {
"autoplay": "false",
"controls": "true",
"loop" : "true",
"loop": "true",
"width": "60%",
"height": "auto",
"poster": "images/wallpaper.jpg"
......@@ -282,9 +266,7 @@
"setting": {
"autoplay": "false",
"controls": "true",
"loop" : "false",
"width": "90%",
"height": "auto"
"preload": "auto"
}
},
{
......
/* Ling view if ther is and link value */
.feature-list-link{
cursor: pointer;
}
......@@ -592,7 +592,29 @@ angular.module('ngMaterialWeburgerCommon').run(['$templateCache', function($temp
$templateCache.put('views/am-wb-common-widgets/feature-list.html',
" <div ng-bind-html=\"wbModel.text | wbunsafe\"> </div> <div ng-class=\"{'dd-rtl':wbModel.style.rtl}\" layout=column layout-align=\"start center\" layout-gt-sm=row layout-align-gt-sm=\"space-around center\" ng-style=\"{'width': '100%'}\"> <div layout=column layout-align=\"center center\" layout-padding ng-repeat=\"s in wbModel.features\"> <img width=128px height=128px ng-src={{s.image}}> <h3 ng-style=\"{'color': wbModel.style.color}\" ng-class=\"{'dd-rtl':wbModel.style.rtl}\"> {{s.title}} <div ng-if=wbEditable> <md-button class=md-icon-button ng-click=editFeature(s)> <wb-icon ng-style=\"{ 'color': wbModel.style.color }\">edit</wb-icon> </md-button> <md-button class=md-icon-button ng-click=removeFeature(s)> <wb-icon ng-style=\"{ 'color': wbModel.style.color }\">delete</wb-icon> </md-button> </div> </h3> <p ng-style=\"{'color': wbModel.style.color, 'line-height':'2', 'text-align':'center'}\" ng-class=\"{'dd-rtl':wbModel.style.rtl}\">{{s.text}}</p> </div> <md-button ng-if=wbEditable aria-label=\"add social\" ng-click=addFeature()> <md-icon ng-style=\"{'color': wbModel.style.color}\">add</md-icon> </md-button> </div>"
" <div ng-hide=isSelected() ng-bind-html=\"wbModel.text | wbunsafe\"> </div> <div ui-tinymce=\"{\n" +
"\t\tselector : 'div.tinymce',\n" +
"\t\ttheme : 'inlite',\n" +
"\t\tplugins : 'directionality contextmenu table link paste image imagetools hr textpattern autolink textcolor colorpicker ',\n" +
"\t\tinsert_toolbar : 'quickimage quicktable',\n" +
"\t\tselection_toolbar : 'bold italic | quicklink h1 h2 h3 blockquote | ltr rtl | forecolor',\n" +
"\t\tinsert_button_items: 'image link | inserttable | hr',\n" +
"\t\tinline : true,\n" +
"\t\tpaste_data_images : true,\n" +
"\t\tbranding: false,\n" +
"\t\timagetools_toolbar: 'rotateleft rotateright | flipv fliph | editimage imageoptions'\n" +
"\t}\" ng-model=wbModel.text ng-show=isSelected() flex> </div> <div ng-class=\"{'dd-rtl':wbModel.style.rtl}\" layout=column layout-align=\"start center\" layout-gt-sm=row layout-align-gt-sm=\"space-around center\" ng-style=\"{'width': '100%'}\"> <div layout=column layout-align=\"center center\" layout-padding ng-repeat=\"s in wbModel.features\" ng-class=\"{'feature-list-link': s.action.type}\" ng-click=\"!wbEditable && runAction(s)\"> <img width=128px height=128px ng-src={{s.image}}> <h3>{{s.title}}</h3> <div ng-hide=isSelected() ng-bind-html=\"s.text | wbunsafe\"> </div> <div ui-tinymce=\"{\n" +
"\t\t\t\tselector : 'div.tinymce',\n" +
"\t\t\t\ttheme : 'inlite',\n" +
"\t\t\t\tplugins : 'directionality contextmenu table link paste image imagetools hr textpattern autolink textcolor colorpicker ',\n" +
"\t\t\t\tinsert_toolbar : 'quickimage quicktable',\n" +
"\t\t\t\tselection_toolbar : 'bold italic | quicklink h1 h2 h3 blockquote | ltr rtl | forecolor',\n" +
"\t\t\t\tinsert_button_items: 'image link | inserttable | hr',\n" +
"\t\t\t\tinline : true,\n" +
"\t\t\t\tpaste_data_images : true,\n" +
"\t\t\t\tbranding: false,\n" +
"\t\t\t\timagetools_toolbar: 'rotateleft rotateright | flipv fliph | editimage imageoptions'\n" +
"\t\t\t}\" ng-model=s.text ng-show=isSelected() flex> </div> </div> <md-button ng-if=wbEditable aria-label=\"add social\" ng-click=addFeature()> <wb-icon>add</wb-icon> </md-button> </div>"
);
......@@ -602,7 +624,7 @@ angular.module('ngMaterialWeburgerCommon').run(['$templateCache', function($temp
$templateCache.put('views/am-wb-common-widgets/feature-toolbar.html',
"<md-toolbar layout=row layout-align=\"center center\"> <md-truncate ng-if=wbModel.label> {{ wbModel.label }}</md-truncate> <md-button hide show-gt-md ng-repeat=\"feature in wbModel.features | limitTo: 8\" aria-label=menu ng-click=\"toggleSidenav('mainSidenav')\" class=md-icon-button> <wb-icon>{{ feature.image }}</wb-icon> </md-button> <span flex></span> <md-menu ng-show=wbModel.features> <md-button aria-label=\"Open demo menu\" class=md-icon-button ng-click=$mdMenu.open($event)> <wb-icon>more_vert</wb-icon> </md-button> <md-menu-content> <md-menu-item ng-repeat=\"feature in wbModel.features\"> <md-button show-gt-md aria-label=menu ng-click=runAction(feature)> <wb-icon>{{ feature.image }}</wb-icon> {{ feature.title }} </md-button> </md-menu-item> </md-menu-content> </md-menu> </md-toolbar>"
"<md-toolbar layout=row layout-align=\"center center\"> <md-truncate ng-if=wbModel.label> {{ wbModel.label }}</md-truncate> <md-button hide show-gt-md ng-repeat=\"feature in wbModel.features | limitTo: 8\" aria-label=menu ng-click=runAction(feature) class=md-icon-button> <img height=32px ng-src=\"{{ feature.image }}\"> <md-tooltip>{{ feature.title }} <br> {{ feature.text }}</md-tooltip> </md-button> <span flex></span> <md-menu ng-show=wbModel.features> <md-button aria-label=\"Open demo menu\" class=md-icon-button ng-click=$mdMenu.open($event)> <wb-icon>more_vert</wb-icon> </md-button> <md-menu-content> <md-menu-item ng-repeat=\"feature in wbModel.features\"> <md-button show-gt-md aria-label=menu ng-click=runAction(feature)> <img height=24px ng-src=\"{{ feature.image }}\"> {{ feature.title }} </md-button> </md-menu-item> </md-menu-content> </md-menu> </md-toolbar>"
);
......
.feature-list-link{cursor:pointer}
\ No newline at end of file
/* Ling view if ther is and link value */
.feature-list-link{
cursor: pointer;
}
\ No newline at end of file
<!-- Main contetn -->
<div
ng-hide="isSelected()"
ng-bind-html="wbModel.text | wbunsafe">
</div>
<div
ui-tinymce="{
selector : 'div.tinymce',
theme : 'inlite',
plugins : 'directionality contextmenu table link paste image imagetools hr textpattern autolink textcolor colorpicker ',
insert_toolbar : 'quickimage quicktable',
selection_toolbar : 'bold italic | quicklink h1 h2 h3 blockquote | ltr rtl | forecolor',
insert_button_items: 'image link | inserttable | hr',
inline : true,
paste_data_images : true,
branding: false,
imagetools_toolbar: 'rotateleft rotateright | flipv fliph | editimage imageoptions'
}"
ng-model="wbModel.text"
ng-show="isSelected()"
flex>
</div>
<div
ng-class="{'dd-rtl':wbModel.style.rtl}"
layout="column"
......@@ -12,29 +30,37 @@
<div
layout="column" layout-align="center center"
layout-padding
ng-repeat="s in wbModel.features">
ng-repeat="s in wbModel.features"
ng-class="{'feature-list-link': s.action.type}"
ng-click="!wbEditable && runAction(s)">
<img width="128px" height="128px" ng-src="{{s.image}}">
<h3
ng-style="{'color': wbModel.style.color}"
ng-class="{'dd-rtl':wbModel.style.rtl}" >
{{s.title}}
<div ng-if="wbEditable" >
<md-button class="md-icon-button" ng-click="editFeature(s)">
<wb-icon ng-style="{ 'color': wbModel.style.color }">edit</wb-icon>
</md-button>
<md-button class="md-icon-button" ng-click="removeFeature(s)">
<wb-icon ng-style="{ 'color': wbModel.style.color }">delete</wb-icon>
</md-button>
</div>
</h3>
<p
ng-style="{'color': wbModel.style.color, 'line-height':'2', 'text-align':'center'}"
ng-class="{'dd-rtl':wbModel.style.rtl}" >{{s.text}}</p>
<h3>{{s.title}}</h3>
<div
ng-hide="isSelected()"
ng-bind-html="s.text | wbunsafe">
</div>
<div
ui-tinymce="{
selector : 'div.tinymce',
theme : 'inlite',
plugins : 'directionality contextmenu table link paste image imagetools hr textpattern autolink textcolor colorpicker ',
insert_toolbar : 'quickimage quicktable',
selection_toolbar : 'bold italic | quicklink h1 h2 h3 blockquote | ltr rtl | forecolor',
insert_button_items: 'image link | inserttable | hr',
inline : true,
paste_data_images : true,
branding: false,
imagetools_toolbar: 'rotateleft rotateright | flipv fliph | editimage imageoptions'
}"
ng-model="s.text"
ng-show="isSelected()"
flex>
</div>
</div>
<md-button
ng-if="wbEditable"
aria-label="add social"
ng-click="addFeature()">
<md-icon ng-style="{'color': wbModel.style.color}">add</md-icon>
<wb-icon>add</wb-icon>
</md-button>
</div>
......@@ -8,9 +8,10 @@
hide show-gt-md
ng-repeat="feature in wbModel.features | limitTo: 8"
aria-label="menu"
ng-click="toggleSidenav('mainSidenav')"
ng-click="runAction(feature)"
class="md-icon-button">
<wb-icon>{{ feature.image }}</wb-icon>
<img height="32px" ng-src="{{ feature.image }}" />
<md-tooltip>{{ feature.title }} <br/> {{ feature.text }}</md-tooltip>
</md-button>
<span flex></span>
......@@ -29,7 +30,7 @@
show-gt-md
aria-label="menu"
ng-click="runAction(feature)">
<wb-icon>{{ feature.image }}</wb-icon>
<img height="24px" ng-src="{{ feature.image }}" />
{{ feature.title }}
</md-button>
</md-menu-item>
......
......@@ -23,9 +23,6 @@ module.exports = function(config) {
// bower:js
'bower_components/jquery/dist/jquery.js',
'bower_components/angular/angular.js',
'bower_components/moment/moment.js',
'bower_components/moment-jalaali/build/moment-jalaali.js',
'bower_components/angular-pluf/dist/angular-pluf.js',
'bower_components/angular-animate/angular-animate.js',
'bower_components/angular-aria/angular-aria.js',
'bower_components/angular-messages/angular-messages.js',
......@@ -39,6 +36,12 @@ module.exports = function(config) {
'bower_components/angular-material-expansion-panel/dist/md-expansion-panel.js',
'bower_components/angular-material-icons/angular-material-icons.min.js',
'bower_components/weakmap-polyfill/weakmap-polyfill.js',
'bower_components/moment/moment.js',
'bower_components/numbro/numbro.js',
'bower_components/pikaday/pikaday.js',
'bower_components/zeroclipboard/dist/ZeroClipboard.js',
'bower_components/handsontable/dist/handsontable.js',
'bower_components/ngHandsontable/dist/ngHandsontable.js',
'bower_components/angular-material-weburger/dist/angular-material-weburger.js',
'bower_components/angular-mocks/angular-mocks.js',
// endbower
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment