cotacts now in client config
This commit is contained in:
1 parent
1bb8c96c07
commit
5c72276b5e
3 files changed
+18
-14
No files matched your search
@@ -1,3 +1,15 @@
|
|||||||
|
import {stringReplace} from '../utils/string';
|
||||||
|
|
||||||
|
const nbsp = 0xA0;
|
||||||
|
|
||||||
|
export let contacts = {
|
||||||
|
telephone: '+7 (81362) 76-312',
|
||||||
|
email: 'hudozka@gmail.com',
|
||||||
|
address: ['г. Шлиссельбург', 'ул. 18 января', 'д. 3']
|
||||||
|
.map(stringReplace(' ', String.fromCharCode(nbsp)))
|
||||||
|
.join(' ')
|
||||||
|
};
|
||||||
|
|
||||||
export let collectiveSortPattern = [
|
export let collectiveSortPattern = [
|
||||||
'mg-timasheva',
|
'mg-timasheva',
|
||||||
'va-sarzhin',
|
'va-sarzhin',
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
import {contacts} from '../config';
|
||||||
|
|
||||||
export default function (app) {
|
export default function (app) {
|
||||||
app.controller('ContactsController', ($scope, config) => {
|
app.controller('ContactsController', $scope => {
|
||||||
$scope.address = config.address;
|
$scope.address = contacts.address;
|
||||||
$scope.telephone = config.telephone;
|
$scope.telephone = contacts.telephone;
|
||||||
$scope.email = config.email;
|
$scope.email = contacts.email;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -8,14 +8,4 @@ angular.module("hudozhka.data", [])
|
|||||||
})
|
})
|
||||||
.service("docs", function () {
|
.service("docs", function () {
|
||||||
return require("../models/document");
|
return require("../models/document");
|
||||||
})
|
|
||||||
.service("config", function(){
|
|
||||||
return {
|
|
||||||
telephone: "+7 (81362) 76-312",
|
|
||||||
email: "hudozka@gmail.com",
|
|
||||||
address: ["г. Шлиссельбург", "ул. 18 января", "д. 3"]
|
|
||||||
.reduce(function(address, item){
|
|
||||||
return address + (address == '' ? '' : ' ') + item.replace(' ', String.fromCharCode(0xA0));
|
|
||||||
}, '')
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user