Get date from store and compare to todays date - javascript

I have a store in sencha, in the store I have 2 date fields, start_date and end_date, I want to get this data from my store, and compare it to the current day, then if the end_date from the store matches todays date, I need to output an ext.toast message, that shows the respective data. This is based on licenses and their start and end dates.
I just need to know how I would set this up, ultimately I want it in the launch function, so it launches on first startup
this is my store
Ext.define('ClientInfo.store.LicenseAllStore', {
extend: 'Ext.data.Store',
requires: [
'ClientInfo.model.LicenseAllModel',
'Ext.data.proxy.Ajax',
'Ext.data.reader.Json'
],
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
storeId: 'LicenseAllStore',
autoLoad: true,
model: 'ClientInfo.model.LicenseAllModel',
proxy: {
type: 'ajax',
extraParams: {
class: 'LicenseAll',
method: 'get'
},
url: 'system/index.php',
reader: {
type: 'json',
rootProperty: 'topics'
}
}
}, cfg)]);
}
});
and this is my model
Ext.define('ClientInfo.model.LicenseAllModel', {
extend: 'Ext.data.Model',
requires: [
'Ext.data.field.Field'
],
fields: [
{
name: 'license_id'
},
{
name: 'license_number'
},
{
name: 'start_date'
},
{
name: 'end_date'
},
{
name: 'duration'
},
{
name: 'expiry_date'
},
{
name: 'product_id'
},
{
name: 'product_name'
},
{
name: 'version'
},
{
name: 'company_id'
},
{
name: 'name'
},
{
name: 'physical_address'
},
{
name: 'postal_address'
},
{
name: 'people_id'
},
{
name: 'firstname'
},
{
name: 'lastname'
},
{
name: 'occupation'
},
{
name: 'office_number'
},
{
name: 'cell_number'
},
{
name: 'email'
},
{
name: 'harware_id'
},
{
name: 'server_url'
},
{
name: 'ip_address'
},
{
name: 'mac_address'
},
{
name: 'os_id'
},
{
name: 'os_name'
},
{
name: 'os_version'
},
{
name: 'os_build'
}
]
});
So far I have this in the launch function
var start = Ext.getCmp('overviewGrid').store.data.start_date;
var end = Ext.getCmp('overviewGrid').store.data.end_date;
var today = new Date();
if(end.setHours(0,0,0,0) == today.setHours(0,0,0,0));
{
Ext.toast({
html: 'Expiring Licenses',
title: 'Licenses',
width: 200,
align: 't',
autoClose: false
});
}

var allRecords = Ext.getCmp('overviewGrid').store.data;
var today = new Date();
//and loop like this
allRecords.each( function(record){
var start = record.data.start_date;
var end = record.data.end_date;
if(Ext.Date.format(end, 'Y-m-d') == Ext.Date.format(today, 'Y-m-d'));
{
Ext.toast({
html: 'Expiring Licenses',
title: 'Licenses',
width: 200,
align: 't',
autoClose: false
});
}
});

Related

Core UI Master menus expand/collapse not working smoothly for some items

Master menus not working smoothly. Please check below observations:
Scenario-1
1.Click on Project menu
2.Select 1st sub-menu, respective page opens up and menu remains open
3.Select 2nd sub-menu, respective page opens up and menu gets closed
4.Same happens with 3rd menu too
It should be: The way menu is working on selecting 1st option, same has to be implemented for other sub-menu’s.
Scenario-2
Click on Project menu
It expands and displays all of its options
Now Click on Client menu
It expands and displays all of its options but project menu still remains expanded
It should be: As soon as another menu is clicked, all previously expanded menu’s should get collapsed.
It is working fine at https://coreui.io/angular/demo/free/2.11.1/#/dashboard
default-layout\default-layout.component.html
<app-sidebar #appSidebar [fixed]="true" [display]="'lg'" [minimized]="sidebarMinimized" (minimizedChange)="toggleMinimize($event)" class="pb-1">
<div class="sidebar-brand d-md-none d-sm-none d-lg-block"><img src="assets/img/brand/logo.png"></div>
<app-sidebar-nav [navItems]="navItems" [perfectScrollbar] [disabled]="appSidebar.minimized" class="pt-1"></app-sidebar-nav>
</app-sidebar>
sidebar.service.ts
import { Injectable } from '#angular/core';
import { Router } from '#angular/router';
#Injectable({
providedIn: 'root'
})
export class SidebarService {
constructor(private router : Router) { }
menuItems: any = [];
makeNavItemModuleBased(module, role) {
let url = (role == 'ROLE_ADMIN') ? '/dashboard/admin' : (role == 'ROLE_MANAGER') ? '/dashboard/manager' : '/dashboard/employee';
let manuItem: any;
if (module == 'USER_MANAGEMENT') {
manuItem = {
name: 'User',
url: '/user/existing-users',
};
}
if (module == 'REPORT_MANAGEMENT') {
manuItem = {
name: 'Reports',
url: '/reports',
// icon: 'cil-building',
children: [
{
name: 'Project',
url: '/reports/project-progress-report',
// icon: 'icon-puzzle',
class: 'nav-link',
}
]
};
}
if (module == 'EMPLOYEE_MANAGEMENT') {
manuItem = {
name: 'Employee',
url: '/employee',
// icon: 'cil-group',
children: [
{
name: 'Employees',
url: '/employee/existing-employees',
// icon: 'cil-library',
class: 'nav-link',
},
{
name: 'Employee Allocation',
url: '/project/allocation',
// icon: 'cil-library',
class: 'nav-link',
},
]
};
}
if (module == 'PROJECT_MANAGEMENT') {
manuItem = {
name: 'Project',
url: '/project',
// icon: 'icon-menu',
children: [
{
name: 'Projects',
url: '/project/existing-projects',
// icon: 'cil-library',
class: 'nav-link',
},
{
name: 'Clients',
url: '/client/existing-clients',
// icon: 'cil-library',
class: 'nav-link',
}
]
};
}
return manuItem;
}
makeNavItem(role: any) {
let emClass ='nav-link';
if(this.router.url == '/employee/add-new-employee' || this.router.url == '/employee/edit-employee/:employeeId' )
{
console.log('url',this.router.url);
emClass ='nav-link active';
}
let url = (role == 'ROLE_ADMIN') ? '/dashboard/admin' : (role == 'ROLE_MANAGER') ? '/dashboard/manager' : '/dashboard/employee';
this.menuItems.push(
{
name: 'Dashboard',
url: url,
type: 'dashboard',
attributes: { hidden: false },
title: false,
},
{
title: true,
name: 'Resource Management',
type: 'resource',
attributes: { hidden: false }
},
{
name: 'Human Resource',
attributes: { hidden: true },
type: 'EMPLOYEE_MANAGEMENT',
url: '/employee/existing-employees',
title: false,
},
{
name: 'Clients',
attributes: { hidden: true },
type: 'PROJECT_MANAGEMENT',
url: '/client/existing-clients',
title: false,
},
{
name: 'Projects',
attributes: { hidden: true },
type: 'PROJECT_MANAGEMENT',
url: '/project/existing-projects',
title: false,
},
{
name: 'Request',
attributes: { hidden: true },
type: 'PROJECT_MANAGEMENT',
url: '/request',
title: false,
},
{
name: 'Assets',
attributes: { hidden: true },
type: 'PROJECT_MANAGEMENT',
url: '/assets',
title: false,
},
{
name: 'Reports',
attributes: { hidden: true },
type: 'REPORT_MANAGEMENT',
url: '/reports',
title: false,
children: [
{
name: 'Project',
url: '/reports/project-progress-report',
class: 'nav-link',
}
]
},
{
title: true,
name: "ADMIN",
attributes: { hidden: true },
url: '/admin',
type: 'ROLE_ADMIN',
},
{
name: 'General',
attributes: { hidden: true },
type: 'ROLE_ADMIN',
url: '/department',
title: false,
children: [
{
name: 'Department',
url: '/department/existing-departments',
class: 'nav-link',
},
]
},
{
name: 'Client',
attributes: { hidden: true },
type: 'ROLE_ADMIN',
url: '/client',
title: false,
children: [
{
name: 'Lead Type',
url: '/client/existing-lead-type',
class: 'nav-link',
},
{
name: 'Industry Type',
url: '/client/existing-industry-type',
class: 'nav-link',
},
]
},
{
name: 'Project',
attributes: { hidden: true },
type: 'ROLE_ADMIN',
url: '/project',
title: false,
children: [
{
name: 'Project Status',
url: '/project/existing-projects-status',
class: 'nav-link',
},
{
name: 'Technology',
url: '/technology/existing-technologies',
class: 'nav-link',
},
{
name: 'Skill',
url: '/skill/existing-skills',
class: 'nav-link',
},
]
},
{
name: 'Employee',
attributes: { hidden: true },
type: 'ROLE_ADMIN',
url: '/employee',
title: false,
children: [
{
name: 'Designation',
url: '/designation/existing-designations',
class: 'nav-link',
},
{
name: 'Employee Allocation Percentage',
url: '/employee/existing-employees-allocation-percentage',
class: 'nav-link',
},
{
name: 'Allocation Type',
url: '/project/existing-allocation-type',
class: 'nav-link',
},
]
},
{
name: 'User',
type: 'ROLE_ADMIN',
url: '/user/existing-users',
title: false,
},
{
name: 'Asset',
attributes: { hidden: true },
type: 'ROLE_ADMIN',
url: '/asset',
title: false,
children: [
{
name: 'Asset',
url: '/asset/existing-assets',
class: 'nav-link',
},
]
},
{
name: 'Security',
attributes: { hidden: true },
type: 'ROLE_ADMIN',
url: '/settings',
title: false,
children: [
{
name: 'Settings',
url: '/settings',
class: 'nav-link',
},
{
name: 'Roles & Permissions',
url: '/role/existing-roles',
class: 'nav-link',
},
{
name: 'Roles Module',
url: '/role/existing-module',
class: 'nav-link',
},
]
},
)
return this.menuItems;
}
makeItemShow(menuItem: any, modules: any, role: any) {
console.log('role', role);
let menus = [];
menuItem.forEach(menu => {
if (menu.type == 'dashboard' || menu.type == 'resource') {
let index = menus.findIndex(p => p.name == menu.name)
if (index === -1) {
menus.push({
name: menu.name,
attributes: { hidden: null },
url: menu.url,
type: menu.type,
title: menu.title,
children: menu.children
},
{ divider: true }
)
}
}
modules.forEach(async (element, index) => {
if (menu.type == element) {
let index = menus.findIndex(p => p.name == menu.name)
if (index === -1) {
menus.push({
name: menu.name,
attributes: { hidden: null },
url: menu.url,
type: menu.type,
title: menu.title,
children: menu.children
},
{ divider: true }
)
}
}
});
if (menu.type == role) {
let index = menus.findIndex(p => p.name == menu.name)
if (index === -1) {
menus.push({
name: menu.name,
attributes: { hidden: null },
url: menu.url,
type: menu.type,
title: menu.title,
children: menu.children
},
{ divider: true }
)
}
}
})
console.log('menus', menus);
return menus;
}
}
It only happening with some menus not on all and I am an UI developer so unable to figure out the issue. Any help would be appreciated Thanks in adnvance :)

Read a JavaScript object from a file and convert it to an Object

Suppose we have following file dataset\test.js
var dataset={
HK_NetMovement_Censtad: {
name: 'HK_NetMovement_Censtad',
keys: [],
columns: [{
id: "dateiso",
name: {
en: "Mid_yr"
},
type: "datetime"
},
{
id: "value",
name: {
en: "Pop_size"
},
type: "numeric"
}
],
fearueServer: 'HK_KEY_VALUE'
},
HK_CPIchangeseason_Censtad: {
fearueServer: 'HK_KEY_VALUE',
columns: [{
id: "dateiso",
name: {
en: "Month"
},
type: "datetime"
},
{
id: "value",
name: {
en: "Monthly Rate"
},
type: "numeric"
}
],
keys: [],
name: 'HK_CPIchangeseason_Censtad'
}
}
I want to read it as an Object in Nodejs. One way is to read it using eval function as follows:
fs.readFile(filepath, 'utf8', function (err, data) {
eval(data)
console.log(dataset)
})
that works fine. But eval function has security holes. Is there any other workarounds to avoid using eval?
Thanks
If I convert those files to the following format
module.exports = function () {
this.dataset = {
HK_NetMovement_Censtad: {
name: 'HK_NetMovement_Censtad',
keys: [],
columns: [{
id: "dateiso",
name: {
en: "Mid_yr"
},
type: "datetime"
},
{
id: "value",
name: {
en: "Pop_size"
},
type: "numeric"
}
],
fearueServer: 'HK_KEY_VALUE'
},
HK_CPIchangeseason_Censtad: {
fearueServer: 'HK_KEY_VALUE',
columns: [{
id: "dateiso",
name: {
en: "Month"
},
type: "datetime"
},
{
id: "value",
name: {
en: "Monthly Rate"
},
type: "numeric"
}
],
keys: [],
name: 'HK_CPIchangeseason_Censtad'
}
}
I can use
var j = require('./datasets/'+file)
to import them into my file and work with them

how to customize kendo react scheduler?

I am implementing the kendo react scheduler in my application. I need to add some extra fields in the scheduler dialog and track the events of the dialog controls and implement some back end logic. I am stuck in this. Not able to do the same. Please help me out.
Thanks in advance!
this is my react js code .
constructor(props) {
super(props);
var self = this;
this.startTime = new Date("2013/6/13 07:00 AM")
this.resources = [
{
field: "ownerId",
title: "Owner",
dataSource: [
{ text: "Alex", value: 1, color: "#f8a398" },
{ text: "Bob", value: 2, color: "#51a0ed" },
{ text: "Charlie", value: 3, color: "#56ca85" }
]
}
]
this.views = [
"day",
{ type: "workWeek", selected: true },
"week",
"month",
"agenda",
{ type: "timeline", eventHeight: 50 }
]
this.views = [{ type: "workWeek", selected: true }]
this.dataSource = {
batch: true,
transport: {
read: {
url: "https://demos.telerik.com/kendo-ui/service/tasks",
dataType: "jsonp"
},
update: {
url: "https://demos.telerik.com/kendo-ui/service/tasks/update",
dataType: "jsonp"
},
create: {
url: "https://demos.telerik.com/kendo-ui/service/tasks/create",
dataType: "jsonp"
},
destroy: {
url: "https://demos.telerik.com/kendo-ui/service/tasks/destroy",
dataType: "jsonp"
},
parameterMap: function (options, operation) {
debugger
if (operation !== "read" && options.models) {
var json = JSON.stringify(options.models);
self.workSpace.createNewItem(options.models[0]).then((responseJson) => {
debugger
})
return { models: JSON.stringify(options.models) };
}
}
},
eventTemplate: $("#event-template").html(),
schema: {
model: {
id: "taskId",
fields: {
taskId: { from: "TaskID", type: "number" },
title: { from: "Title", defaultValue: "No title", validation: { required: true } },
phoneNumber: { from: "phoneNumber", type: "number", validation: { required: true } },
start: { type: "date", from: "Start" },
end: { type: "date", from: "End" },
startTimezone: { from: "StartTimezone" },
endTimezone: { from: "EndTimezone" },
description: { from: "Description" },
recurrenceId: { from: "RecurrenceID" },
recurrenceRule: { from: "RecurrenceRule" },
recurrenceException: { from: "RecurrenceException" },
ownerId: { from: "OwnerID", defaultValue: 1 },
isAllDay: { type: "boolean", from: "IsAllDay" }
}
}
},
filter: {
logic: "or",
filters: [
{ field: "ownerId", operator: "eq", value: 1 },
{ field: "ownerId", operator: "eq", value: 2 }
]
}
}
}
render() {
return (
<div className="container-fluid">
<div className="row col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div>
<Scheduler height={600}
change={this.onChange}
views={this.views}
dataSource={this.dataSource}
date={new Date()}
startTime={this.startTime}
resources={this.resources} />
</div>
</div>
</div>
);
}

Extjs store.sync error with multiple instance of same model

I have a problem with store.sync()
I use multiple form (multiple instance of same model in different tab) with the same model/store but with not all the fields of the model.
When i use store.sync the store work, i have the record in my database and the result is success:true !
I load the form :
if(modeleActif == 'UniteDeTemps') {
var form = Ext.getCmp('Form'+modeleActif+'1');
var record = Ext.create('ModuleGestion.model.'+modeleActif);
form.loadRecord(record);
var form = Ext.getCmp('Form'+modeleActif+'2');
var record = Ext.create('ModuleGestion.model.'+modeleActif);
form.loadRecord(record);
var form = Ext.getCmp('Form'+modeleActif+'3');
var record = Ext.create('ModuleGestion.model.'+modeleActif);
form.loadRecord(record);
var form = Ext.getCmp('Form'+modeleActif+'4');
var record = Ext.create('ModuleGestion.model.'+modeleActif);
form.loadRecord(record);
}
My controller action:
if(modeleActif == 'UniteDeTemps') {
modeleUDTActif = Ext.getCmp('TabUniteDeTempsForm').getActiveTab().id;
Type_O_J_S_M = modeleUDTActif.substr(15,modeleActif.length);
var form = Ext.getCmp('Form'+modeleActif+Type_O_J_S_M);
var store = this['get'+modeleActif+'Store']();
record = form.getRecord();
values = form.getValues();
if (form.isValid()) {
record.set(values);
store.add(record);
store.sync({
success: function(batch, options) {
store.load();
},
failure: function(batch, options) {
Ext.Msg.alert("Erreur",batch.proxy.getReader().jsonData.message);
}
});
}
}
My model
Ext.define('ModuleGestion.model.UniteDeTemps', {
extend: 'Ext.data.Model',
idProperty: 'idUniteDeTemps',
fields: [
{
name: 'idUniteDeTemps'
},
{
name: 'UniteDeTemps'
},
{
name: 'Type_O_J_S_M'
},
{
name: 'Type_M'
},
{
name: 'Occurence'
},
{
name: 'RepetitionJ'
},
{
name: 'RepetitionS'
},
{
name: 'Jours'
},
{
name: 'Mois'
},
{
name: 'Quantieme'
},
{
name: 'Numero'
}
]
});
My form:
{
xtype: 'form',
border: false,
id: 'FormUniteDeTemps1',
bodyPadding: 10,
title: '',
items: [
{
xtype: 'textfield',
width: 305,
fieldLabel: 'Nom',
name: 'UniteDeTemps'
},
{
xtype: 'hiddenfield',
fieldLabel: 'Label',
name: 'idUniteDeTemps'
},
{
xtype: 'hiddenfield',
fieldLabel: 'Label',
name: 'Type_O_J_S_M'
},
{
xtype: 'numberfield',
fieldLabel: 'Nombre d\'occurences',
labelWidth: 150,
name: 'Occurence'
}
]
}

dojo exception:Object [object Object] has no method 'appendChild'

Hy,
i have some problems with dojo. I will migrate my scripts from 1.8 to 2.0.
This is my code:
I develop a addon for the new Univention Corporated Server 3.1. Univention has updated th dojo framework from 1.8 to 2.0 and i must migrate my code.
Under dojo 1.8 works my program very well.
define([
"dojo",
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/_base/array",
"umc/widgets/Module",
"umc/widgets/ContainerWidget",
"umc/widgets/Page",
"umc/widgets/Form",
"umc/widgets/Grid",
"umc/widgets/TabContainer",
"umc/widgets/ExpandingTitlePane"
], function(declare,lang,array,Module,ContainerWidget,Page,Form,Grid,declare, lang, array,TabContainer,_){
return declare("umc.modules.asteriskUser",[ Module ],{
_buttons: null,
_mailboxHint: null,
_mailboxForm: null,
_grid: null,
_forms: [],
buildRendering: function () {
this.inherited(arguments);
this._buttons = [{
name: 'submit',
label: "Speichern",
callback: lang.hitch(this, function () {
this.save();
}),
}];
this._forms = [];
var tabContainer = new umc.widgets.TabContainer({
nested: true
});
tabContainer.addChild(this.renderPhones());
tabContainer.addChild(this.renderMailbox());
tabContainer.addChild(this.renderForwarding());
this.addChild(tabContainer);
this.startup();
this.load();
},
renderMailbox: function () {
var page = new umc.widgets.Page({
title: "Anrufbeantworter",
headerText: "Anrufbeantwortereinstellungen",
footerButtons: this._buttons,
closable: false,
});
var container = new umc.widgets.ContainerWidget({
scrollable: true,
});
page.addChild(container);
var noMailboxHint = new umc.widgets.Text({
content: "Leider hat Ihnen der Administrator keinen " +
"Anrufbeantworter zugewiesen.",
region: "top",
});
container.addChild(noMailboxHint);
this._mailboxHint = noMailboxHint;
var widgets = [{
type: 'TextBox',
name: 'mailbox/password',
label: "PIN-Nummer zum Abrufen",
}, {
type: 'ComboBox',
name: 'mailbox/email',
label: "Per eMail benachrichtigen?",
staticValues: [
{ id: '0', label: "Nein" },
{ id: '1', label: "Ja, gerne!" },
],
}, {
type: 'ComboBox',
name: 'mailbox/timeout',
label: "Mailbox antwortet nach",
staticValues: [
{ id: '5', label: "5 Sekunden" },
{ id: '10', label: "10 Sekunden" },
{ id: '20', label: "20 Sekunden" },
{ id: '30', label: "30 Sekunden" },
{ id: '45', label: "45 Sekunden" },
{ id: '60', label: "einer Minute" },
{ id: '120', label: "zwei Minuten" },
{ id: '180', label: "π Minuten" },
],
}];
var layout = [
'mailbox/password',
'mailbox/email',
'mailbox/timeout'
];
var form = new umc.widgets.Form({
widgets: widgets,
layout: layout,
scrollable: true,
});
container.addChild(form);
this._forms.push(form);
this._mailboxForm = form;
this._mailboxForm.domNode.style.display = 'none';
this._mailboxHint.domNode.style.display = 'block';
return page;
},
renderPhones: function () {
var page = new umc.widgets.Page({
title: "Telefone",
headerText: "Telefoneinstellungen",
footerButtons: this._buttons,
closable: false,
});
var container = new umc.widgets.ExpandingTitlePane({
title: "Klingelreihenfolge",
});
page.addChild(container);
this._grid = new umc.widgets.Grid({
moduleStore: umc.store.getModuleStore("dn",
"asteriskUser/phones"),
query: {
filter:'*',
},
columns: [{
name: 'position',
label: "Position",
editable: false,
hidden: true,
}, {
name: 'name',
label: "Telefon",
editable: false,
}],
actions: [{
name: 'earlier',
label: "Früher",
isStandardAction: true,
canExecute: lang.hitch(this, function (values) {
return values.position > 0;
}),
callback: lang.hitch(this, function (id) {
this._grid.filter({
dn: id,
position: -1,
});
}),
}, {
name: 'later',
label: "Später",
isStandardAction: true,
canExecute: lang.hitch(this, function (values) {
return (values.position + 1 <
this._grid._grid.rowCount);
}),
callback: lang.hitch(this, function (id) {
this._grid.filter({
dn: id,
position: 1,
});
}),
}],
});
container.addChild(this._grid);
foo = this._grid;
this._grid._grid.canSort = function (index) {
return false;
};
var widgets = [{
type: 'ComboBox',
name: 'phones/interval',
label: "Klingelintervall",
staticValues: [
{ id: '2', label: "2 Sekunden" },
{ id: '4', label: "4 Sekunden" },
{ id: '6', label: "6 Sekunden" },
{ id: '8', label: "8 Sekunden" },
{ id: '10', label: "10 Sekunden" },
],
}];
var layout = [
'phones/interval',
];
var form = new umc.widgets.Form({
region: 'top',
widgets: widgets,
layout: layout,
scrollable: true,
});
page.addChild(form);
this._forms.push(form);
page.startup();
return page;
},
renderForwarding: function () {
var page = new umc.widgets.Page({
title: "Weiterleitung",
headerText: "Weiterleitungseinstellungen",
footerButtons: this._buttons,
closable: false,
});
var container = new umc.widgets.ContainerWidget({
scrollable: true,
});
page.addChild(container);
var widgets = [{
type: 'TextBox',
name: 'forwarding/number',
label: "Weiterleitungsziel",
}];
var layout = [
'forwarding/number'
];
var form = new umc.widgets.Form({
widgets: widgets,
layout: layout,
scrollable: true,
});
container.addChild(form);
this._forms.push(form);
return page;
},
setValues: function (values) {
array.forEach(this._forms, function (form) {
form.setFormValues(values);
}, this);
// disable the mailbox form if needed
if (values.mailbox) {
this._mailboxForm.domNode.style.display = 'block';
this._mailboxHint.domNode.style.display = 'none';
} else {
this._mailboxForm.domNode.style.display = 'none';
this._mailboxHint.domNode.style.display = 'block';
}
},
getValues: function () {
var values = {};
array.forEach(this._forms, function (form) {
lang.mixin(values, form.gatherFormValues());
}, this);
return values;
},
load: function () {
this.umcpCommand('asteriskUser/load').then(
lang.hitch(this, function (data) {
this.setValues(data.result);
}),
lang.hitch(this, function () {
// hm...
})
);
},
save: function () {
var data = this.getValues();
this.umcpCommand('asteriskUser/save', data);
},
});
});
So and Chrome give me the following exception message:
Uncaught TypeError: Object [object Object] has no method 'appendChild'
_1a86.buildRendering
_11cd
_abc.buildRendering
_13a4.create
_13a4.postscript
a
_11e4
a
(anonymous function)
_c6
_36
_36
_7b
_37
_7b
_ee
req.injectUrl._108
Have anyone an idea?
Thx for helping!

Categories