Commit 8c56b01b authored by hadi's avatar hadi
Browse files

Merge branch 'release/0.2.2'

parents 2c6f86de 840f2962
Pipeline #8993327 passed with stage
in 7 minutes and 20 seconds
{
"name": "angular-material-weburger-common",
"version": "0.2.1",
"version": "0.2.2",
"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.0"
"angular-material-weburger": "^0.2.2"
},
"devDependencies": {
"angular-mocks": "^1.6.0"
......
......@@ -95,6 +95,7 @@
<script src="scripts/app.js"></script>
<script src="scripts/configs/icons.js"></script>
<script src="scripts/configs/filters.js"></script>
<script src="scripts/runs/widgets.js"></script>
<script src="scripts/runs/settings.js"></script>
......@@ -102,6 +103,8 @@
<script src="scripts/controllers/action.js"></script>
<script src="scripts/controllers/features.js"></script>
<script src="scripts/controllers/dialogmodel.js"></script>
<script src="scripts/controllers/video-player.js"></script>
<script src="scripts/controllers/audio-player.js"></script>
<!-- endbuild -->
</body>
</html>
{"type":"Page","label":"دونیت - حمایت مالی پروژه‌ها","description":"دونیت شمارا در جمع کردن کمک‌های مالی یاری می‌کند.","style":{"layout":"column","borderRadius":{},"borderStyleColorWidth":{},"borderStyle":{},"borderWidth":{},"borderColor":{},"flexDirection":"wb-flex-column","padding":{},"margin":{}},"contents":[{"style":{"padding":{},"borderRadius":{},"borderStyleColorWidth":{},"borderStyle":{},"borderWidth":{},"borderColor":{"bottom":"none"},"margin":{},"flexAlignItem":"wb-flex-item-auto"},"type":"CommonFeatureToolbar","name":"Widget","features":[{"icon":"assignment_turned_in","title":"Home","text":"Feature description.","image":"home","action":{"type":"link","link":"https://gitlab.com/weburger/am-wb-common","label":"Common widget home"}},{"icon":"assignment_turned_in","title":"Favorite items","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"}}],"label":"Common widgets","description":"This is a demo of common widgets."},{"type":"CommonActionCall","style":{"padding":{},"margin":{},"borderRadius":{},"borderStyleColorWidth":{},"borderStyle":{},"borderWidth":{},"borderColor":{"bottom":"none"},"flexAlignItem":"wb-flex-item-auto","background":"url(\"images/wallpaper.jpg\")","backgroundSize":"cover"},"features":[{"icon":"assignment_turned_in","title":"Go to Home","text":"Feature description.","action":{"type":"link","link":"https://gitlab.com/weburger/am-wb-common","label":"Home"}},{"icon":"assignment_turned_in","title":"Action call","text":"Action Call","image":"","action":{"type":"link","link":"https://gitlab.com/weburger/am-wb-common/wikis/action-call"}}],"name":"Widget","action":{"label":"My action","type":"link","link":"http://google.com"},"label":"DigiDoci","description":"Repair your device as easy as possible"},{"type":"CommonFeatureList","style":{"padding":{},"margin":{},"borderRadius":{},"borderStyleColorWidth":{},"borderStyle":{},"borderWidth":{},"borderColor":{}},"features":[{"icon":"assignment_turned_in","title":"Customize","text":"This is fully customization widgets.","image":"images/demo/settings-3.svg"},{"icon":"assignment_turned_in","title":"Share it","text":"Easy to share your configuration and design.","image":"images/demo/share.svg","action":{"type":"link","link":"http://google.com","label":"Go"}},{"icon":"assignment_turned_in","title":"Mobile frindly","text":"The system is fully mobile adaptable.","image":"images/demo/smartphone-4.svg"},{"icon":"assignment_turned_in","title":"Multimedia","text":"Supports multimedia to attract users.","image":"images/demo/speaker-2.svg"}],"name":"Widget"},{"style":{"padding":{},"margin":{},"borderRadius":{},"borderStyleColorWidth":{},"borderStyle":{},"borderWidth":{},"borderColor":{"bottom":"none"},"flexDirection":"wb-flex-row","alignItems":"wb-flex-align-items-stretch","justifyContent":"wb-flex-justify-content-space-around","flexAlignItem":"wb-flex-item-auto"},"type":"Group","name":"Panel","contents":[{"style":{"padding":{},"borderRadius":{},"borderStyleColorWidth":{},"borderStyle":{},"borderWidth":{},"borderColor":{"bottom":"none"},"margin":{},"flexAlignItem":"wb-flex-item-auto"},"type":"CommonFeatureLinks","name":"Widget","features":[{"icon":"assignment_turned_in","title":"Weburger","text":"See weburger home","action":{"type":"link","link":"https://gitlab.com/groups/weburger","label":"Weburger"}},{"icon":"assignment_turned_in","title":"Common widgets","text":"See common widgets","action":{"type":"link","link":"https://gitlab.com/weburger/am-wb-common","label":"common"}},{"icon":"assignment_turned_in","title":"Feature links help","text":"See online help about feature list.","action":{"link":"https://gitlab.com/weburger/am-wb-common/wikis/feature-links","type":"link","label":"Features link"}},{"icon":"assignment_turned_in","title":"Action title#1","text":"Feature description."},{"icon":"assignment_turned_in","title":"Action title#2","text":"Feature description."},{"icon":"assignment_turned_in","title":"Action title#3","text":"Feature description."}]},{"style":{"padding":{},"borderRadius":{},"borderStyleColorWidth":{},"borderStyle":{},"borderWidth":{},"borderColor":{},"margin":{}},"type":"CommonFeatureMozaic","name":"Widget","features":[{"icon":"assignment_turned_in","title":"Feature title","text":"Feature description."},{"icon":"assignment_turned_in","title":"Feature title","text":"Feature description."},{"icon":"assignment_turned_in","title":"Feature title","text":"Feature description."},{"icon":"assignment_turned_in","title":"Feature title","text":"Feature description."}]}]}]}
\ No newline at end of file
{
"type": "Page",
"label": "دونیت - حمایت مالی پروژه‌ها",
"description": "دونیت شمارا در جمع کردن کمک‌های مالی یاری می‌کند.",
"style": {
"layout": "column",
"borderRadius": {
},
"borderStyleColorWidth": {
},
"borderStyle": {
},
"borderWidth": {
},
"borderColor": {
},
"flexDirection": "wb-flex-column",
"padding": {
},
"margin": {
}
},
"contents": [
{
"style": {
"padding": {
},
"borderRadius": {
},
"borderStyleColorWidth": {
},
"borderStyle": {
},
"borderWidth": {
},
"borderColor": {
"bottom": "none"
},
"margin": {
},
"flexAlignItem": "wb-flex-item-auto"
},
"type": "CommonFeatureToolbar",
"name": "Widget",
"features": [
{
"icon": "assignment_turned_in",
"title": "Home",
"text": "Feature description.",
"image": "home",
"action": {
"type": "link",
"link": "https://gitlab.com/weburger/am-wb-common",
"label": "Common widget home"
}
},
{
"icon": "assignment_turned_in",
"title": "Favorite items",
"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"
}
}
],
"label": "Common widgets",
"description": "This is a demo of common widgets."
},
{
"type": "CommonActionCall",
"style": {
"padding": {
},
"margin": {
},
"borderRadius": {
},
"borderStyleColorWidth": {
},
"borderStyle": {
},
"borderWidth": {
},
"borderColor": {
"bottom": "none"
},
"flexAlignItem": "wb-flex-item-auto",
"background": "url(\"images/wallpaper.jpg\")",
"backgroundSize": "cover"
},
"features": [
{
"icon": "assignment_turned_in",
"title": "Go to Home",
"text": "Feature description.",
"action": {
"type": "link",
"link": "https://gitlab.com/weburger/am-wb-common",
"label": "Home"
}
},
{
"icon": "assignment_turned_in",
"title": "Action call",
"text": "Action Call",
"image": "",
"action": {
"type": "link",
"link": "https://gitlab.com/weburger/am-wb-common/wikis/action-call"
}
}
],
"name": "Widget",
"action": {
"label": "My action",
"type": "link",
"link": "http://google.com"
},
"label": "DigiDoci",
"description": "Repair your device as easy as possible"
},
{
"type": "CommonFeatureList",
"style": {
"padding": {
},
"margin": {
},
"borderRadius": {
},
"borderStyleColorWidth": {
},
"borderStyle": {
},
"borderWidth": {
},
"borderColor": {
}
},
"features": [
{
"icon": "assignment_turned_in",
"title": "Customize",
"text": "This is fully customization widgets.",
"image": "images/demo/settings-3.svg"
},
{
"icon": "assignment_turned_in",
"title": "Share it",
"text": "Easy to share your configuration and design.",
"image": "images/demo/share.svg",
"action": {
"type": "link",
"link": "http://google.com",
"label": "Go"
}
},
{
"icon": "assignment_turned_in",
"title": "Mobile frindly",
"text": "The system is fully mobile adaptable.",
"image": "images/demo/smartphone-4.svg"
},
{
"icon": "assignment_turned_in",
"title": "Multimedia",
"text": "Supports multimedia to attract users.",
"image": "images/demo/speaker-2.svg"
}
],
"name": "Widget"
},
{
"style": {
"padding": {
},
"margin": {
},
"borderRadius": {
},
"borderStyleColorWidth": {
},
"borderStyle": {
},
"borderWidth": {
},
"borderColor": {
}
},
"type": "CommonVideoPlayer",
"name": "Widget",
"content": {
"url": "https://www.w3schools.com/html/mov_bbb.ogg",
"mimeType": "video/ogg"
},
"setting": {
"autoplay": "false",
"controls": "true",
"loop" : "true",
"width": "60%",
"height": "auto",
"poster": "images/wallpaper.jpg"
}
},
{
"style": {
"padding": {
},
"margin": {
},
"borderRadius": {
},
"borderStyleColorWidth": {
},
"borderStyle": {
},
"borderWidth": {
},
"borderColor": {
}
},
"type": "CommonAudioPlayer",
"name": "Widget",
"content": {
"url": "https://www.w3schools.com/html/mov_bbb.ogg",
"mimeType": "audio/mpeg"
},
"setting": {
"autoplay": "false",
"controls": "true",
"loop" : "false",
"width": "90%",
"height": "auto"
}
},
{
"style": {
"padding": {
},
"margin": {
},
"borderRadius": {
},
"borderStyleColorWidth": {
},
"borderStyle": {
},
"borderWidth": {
},
"borderColor": {
"bottom": "none"
},
"flexDirection": "wb-flex-row",
"alignItems": "wb-flex-align-items-stretch",
"justifyContent": "wb-flex-justify-content-space-around",
"flexAlignItem": "wb-flex-item-auto"
},
"type": "Group",
"name": "Panel",
"contents": [
{
"style": {
"padding": {
},
"borderRadius": {
},
"borderStyleColorWidth": {
},
"borderStyle": {
},
"borderWidth": {
},
"borderColor": {
"bottom": "none"
},
"margin": {
},
"flexAlignItem": "wb-flex-item-auto"
},
"type": "CommonFeatureLinks",
"name": "Widget",
"features": [
{
"icon": "assignment_turned_in",
"title": "Weburger",
"text": "See weburger home",
"action": {
"type": "link",
"link": "https://gitlab.com/groups/weburger",
"label": "Weburger"
}
},
{
"icon": "assignment_turned_in",
"title": "Common widgets",
"text": "See common widgets",
"action": {
"type": "link",
"link": "https://gitlab.com/weburger/am-wb-common",
"label": "common"
}
},
{
"icon": "assignment_turned_in",
"title": "Feature links help",
"text": "See online help about feature list.",
"action": {
"link": "https://gitlab.com/weburger/am-wb-common/wikis/feature-links",
"type": "link",
"label": "Features link"
}
},
{
"icon": "assignment_turned_in",
"title": "Action title#1",
"text": "Feature description."
},
{
"icon": "assignment_turned_in",
"title": "Action title#2",
"text": "Feature description."
},
{
"icon": "assignment_turned_in",
"title": "Action title#3",
"text": "Feature description."
}
]
},
{
"style": {
"padding": {
},
"borderRadius": {
},
"borderStyleColorWidth": {
},
"borderStyle": {
},
"borderWidth": {
},
"borderColor": {
},
"margin": {
}
},
"type": "CommonFeatureMozaic",
"name": "Widget",
"features": [
{
"icon": "assignment_turned_in",
"title": "Feature title",
"text": "Feature description."
},
{
"icon": "assignment_turned_in",
"title": "Feature title",
"text": "Feature description."
},
{
"icon": "assignment_turned_in",
"title": "Feature title",
"text": "Feature description."
},
{
"icon": "assignment_turned_in",
"title": "Feature title",
"text": "Feature description."
}
]
}
]
}
]
}
\ No newline at end of file
......@@ -25,6 +25,41 @@
angular.module('ngMaterialWeburgerCommon', [ 'ngMaterialWeburger' ]);
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 weburger
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
'use strict';
/**
*
*/
angular.module('ngMaterialWeburgerCommon')
.filter("trueOrUndefined", function() {
return function(value) {
var res = (value === true || value === 'true');
return res ? res : undefined;
};
});
/*
* The MIT License (MIT)
......@@ -66,6 +101,60 @@ angular.module('ngMaterialWeburgerCommon')
.addShape('wb-common-html', ' <path id="path2" d="M12,0C9.694,0,7.781,1.758,7.53,4L7.5,5c0,2.2,1.8,4,4,4h1h3h2l2-4h12l-1.961,3.921 C29.521,8.958,29.548,9,29.588,9h0.211H50.5V0H12z" style="fill:#EAD8BB;" /><path id="path4" d="M29.5,9v26.201c0,0.505-0.665,0.69-0.925,0.256L23.5,27l-5.075,8.458 c-0.26,0.433-0.925,0.249-0.925-0.256V9h-6c-2.2,0-4-1.8-4-4v48.958C7.5,56.19,9.31,58,11.542,58H50.5V9H29.5z" style="fill:#6B4842;" /><path id="path6" d="M12.5,9h-1c-2.2,0-4-1.8-4-4v48.958C7.5,56.19,9.31,58,11.542,58H12.5V9z" style="fill:#513531;" /><path id="path8" d="M50.5,2h-9c-0.553,0-1,0.447-1,1s0.447,1,1,1h9V2z" style="fill:#D3BEA1;" /><path id="path10" d="M50.5,5h-8c-0.553,0-1,0.447-1,1s0.447,1,1,1h8V5z" style="fill:#D3BEA1;" /><path id="path12" d="M19.5,5l-2,4v26.201c0,0.505,0.666,0.69,0.925,0.256L23.5,27l5.075,8.458 c0.26,0.433,0.925,0.249,0.925-0.256V9l2-4H19.5z" style="fill:#DD352E;" /><polygon id="polygon14" points="19.5,5 17.5,9 29.5,9 31.5,5 " style="fill:#B02721;" /> ')
;
}])
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 weburger
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
'use strict';
/**
*
*/
angular.module('ngMaterialWeburgerCommon')
/**
*
*/
.controller('AmWbCommonAudioCtrl', function($scope, $rootScope, $wbUi) {
var ngModel = $scope.wbModel;
/*
* Listen model
*/
$scope.$watch('wbModel', function() {
if (angular.isDefined($scope.wbModel)) {
ngModel = $scope.wbModel;
if (!angular
.isDefined(ngModel.file)) {
ngModel.content = {};
ngModel.content.url = 'https://www.w3schools.com/html/mov_bbb.ogg';
ngModel.content.mimeType = 'audio/mpeg';
ngModel.setting = {};
ngModel.setting.autoplay = 'false';
ngModel.setting.controls = 'true';
ngModel.setting.preload = 'auto';
}
}
});
// Global functions
});
'use strict';
angular.module('ngMaterialWeburgerCommon')
......@@ -119,7 +208,7 @@ angular.module('ngMaterialWeburgerCommon')
/**
*
*/
.controller('AmWbCommonFeaturesCtrl', function($scope, $rootScope, $wbUi) {
.controller('AmWbCommonFeaturesCtrl', function($scope, $wbUi, $window, $resource) {
var ngModel = $scope.wbModel;
function addFeature(){
......@@ -186,7 +275,23 @@ angular.module('ngMaterialWeburgerCommon')
* run feature action
*/
function runAction(feature) {
return $rootScope.runAction(feature.action);