Skip to content

Commit

Permalink
Web interface. Stable. Minor changes. fintech-fab#12
Browse files Browse the repository at this point in the history
  • Loading branch information
devpull committed Aug 29, 2014
1 parent 24e5b88 commit 6f16fed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function create()
return json_encode([
'status' => 'success',
'message' => 'Новое правило создано.',
'data' => ['count' => $oEvent->count('id')]
'data' => ['count' => $oEvent::whereEventId($oRequestData['event_id'])->count()]
]);
}

Expand Down Expand Up @@ -103,7 +103,8 @@ public function delete($id)
}

if ($rule->delete()) {
$iRulesCount = $rule->count('id');

$iRulesCount = $rule::whereEventId($rule->event_id)->count();

return json_encode([
'status' => 'success',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ function typeFromString(string) {
* @param $th
* @param oData
*/
function updRulesCountFromRules($th, oData) {
function updRulesCountFromRules($th, oData) { // TODO: bug adding to different rules.
var $eventId = $th.closest('tr.event-rules-row').data('event-rules');
var $ruleRow = $('#events-rules').find('tr[data-id=' + $eventId + ']');
var $seeRules = $ruleRow.find('button.see-rules');
Expand Down

0 comments on commit 6f16fed

Please sign in to comment.