Skip to content

Commit

Permalink
Mistakes in templates fixed.
Browse files Browse the repository at this point in the history
polemarch/ce#26

[ci skip]
  • Loading branch information
akhmadullin committed May 22, 2018
1 parent 9e7fdac commit 2c5e1f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions polemarch/static/js/pmModuleTemplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ pmModuleTemplates.showItem = function(holder, menuInfo, data)
{
$.when(pmProjects.loadItem(thisObj.model.items[item_id].data.project)).done(function ()
{
thisObj.model.selectedProject = thisObj.model.items[item_id].project;
thisObj.model.selectedProject = thisObj.model.items[item_id].data.project;
$.when(pmModuleTemplates.selectInventory(pmModuleTemplates.model.items[item_id].data.inventory)).always(function()
{
var tpl = thisObj.model.name+'_module_page'
Expand Down Expand Up @@ -625,7 +625,7 @@ pmModuleTemplates.showNewItemPage = function(holder, menuInfo, data)
$.when(pmProjects.loadItem(pmProjects.model.itemslist.results[0].id)).done(function()
{
//for P+
thisObj.model.selectedProject == pmProjects.model.itemslist.results[0].id;
thisObj.model.selectedProject = pmProjects.model.itemslist.results[0].id;
//
$(holder).insertTpl(spajs.just.render(thisObj.model.name+'_new_module_page', {}))

Expand Down
6 changes: 3 additions & 3 deletions polemarch/static/js/pmTasksTemplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ pmTasksTemplates.showNewOptionPage = function(holder, menuInfo, data)
var item_id = data.reg[1]
$.when(pmProjects.loadAllItems(), pmTasksTemplates.loadItem(item_id), pmInventories.loadAllItems(), pmTasks.loadAllItems()).done(function()
{
thisObj.model.selectedProject == pmTasksTemplates.model.items[item_id].project
thisObj.model.selectedProject = thisObj.model.items[item_id].data.project

var tpl = 'new_option_page'
if(!spajs.just.isTplExists(tpl))
Expand Down Expand Up @@ -634,7 +634,7 @@ pmTasksTemplates.showOptionPage = function(holder, menuInfo, data)
var option_name=data.reg[2];
$.when(pmProjects.loadAllItems(), pmTasksTemplates.loadItem(item_id), pmInventories.loadAllItems(), pmTasks.loadAllItems()).done(function()
{
thisObj.model.selectedProject == pmTasksTemplates.model.items[item_id].project;
thisObj.model.selectedProject = thisObj.model.items[item_id].project;

pmTasksTemplates.model.items[item_id].option_name=option_name;
pmTasksTemplates.model.items[item_id].dataForOption={};
Expand Down Expand Up @@ -715,7 +715,7 @@ pmTasksTemplates.showItem = function(holder, menuInfo, data)
{
$.when(pmProjects.loadItem(thisObj.model.items[item_id].data.project)).done(function ()
{
thisObj.model.selectedProject = pmTasksTemplates.model.items[item_id].project
thisObj.model.selectedProject = pmTasksTemplates.model.items[item_id].data.project

var tpl = thisObj.model.name+'_page'
if(!spajs.just.isTplExists(tpl))
Expand Down

0 comments on commit 2c5e1f9

Please sign in to comment.