From a7ba48ded04b1ca6f3fad2a220ca6fe8d3648106 Mon Sep 17 00:00:00 2001 From: "dmitry.s" <sv.l1@mail.ru> Date: Tue, 7 Jul 2015 12:13:17 +0300 Subject: [PATCH] fixed garbadge --- media/js/task1.js | 5 ---- ~dev_rating/application/bootstrap.php | 18 --------------- .../classes/Controller/Handler/Task.php | 17 -------------- .../classes/Controller/Student/Task1.php | 19 --------------- ~dev_rating/application/views/task1.twig | 23 ------------------- 5 files changed, 82 deletions(-) delete mode 100644 media/js/task1.js delete mode 100644 ~dev_rating/application/classes/Controller/Handler/Task.php delete mode 100644 ~dev_rating/application/classes/Controller/Student/Task1.php delete mode 100644 ~dev_rating/application/views/task1.twig diff --git a/media/js/task1.js b/media/js/task1.js deleted file mode 100644 index 2db58c137..000000000 --- a/media/js/task1.js +++ /dev/null @@ -1,5 +0,0 @@ -$(function () { -$('.btn').on('click', function() { - alert(1); -}); -}); \ No newline at end of file diff --git a/~dev_rating/application/bootstrap.php b/~dev_rating/application/bootstrap.php index dd35f72e2..b1c56b9d4 100644 --- a/~dev_rating/application/bootstrap.php +++ b/~dev_rating/application/bootstrap.php @@ -287,21 +287,3 @@ Route::set('javaSessionProvider', 'java_authentication') 'controller' => 'JavaAuthentication', 'action' => 'authentication' ]); -Route::set('test', 'test') - ->defaults([ - 'directory' => 'Student', - 'controller' => 'test', - 'action' => 'go' - ]); -Route::set('task1', 'task1') - ->defaults([ - 'directory' => 'Student', - 'controller' => 'task1', - 'action' => 'go' - ]); - -Route::set('departments:main', 'departments(/<id>)', ['id' => '[0-9]+']) - ->defaults([ - 'controller' => 'Departments', // classes/Controller/Departments.php - 'id' => 1, - ]); diff --git a/~dev_rating/application/classes/Controller/Handler/Task.php b/~dev_rating/application/classes/Controller/Handler/Task.php deleted file mode 100644 index b58ba255b..000000000 --- a/~dev_rating/application/classes/Controller/Handler/Task.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php defined('SYSPATH') or die('No direct script access.'); - -class Controller_Handler_Task extends Controller_Handler -{ - - public function action_get() - { - $id = $this->post['id']; - $data = Model_Faculty::with($id); - $dep = $data->getDepartments(); - - $this->response->body(json_encode($dep)); - } - -} - - diff --git a/~dev_rating/application/classes/Controller/Student/Task1.php b/~dev_rating/application/classes/Controller/Student/Task1.php deleted file mode 100644 index 05401c87e..000000000 --- a/~dev_rating/application/classes/Controller/Student/Task1.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php defined('SYSPATH') or die('No direct script access.'); - -class Controller_Student_Task1 extends Controller_Handler -{ - - public function action_go() - { - $data = Model_Faculty::with(1); - $dep = $data->getDepartments(); - $twig = Twig::factory('task1'); - $twig->set([ - "Departments" => $dep - ]); - $this->response->body($twig); - } - -} - - diff --git a/~dev_rating/application/views/task1.twig b/~dev_rating/application/views/task1.twig deleted file mode 100644 index a95c87600..000000000 --- a/~dev_rating/application/views/task1.twig +++ /dev/null @@ -1,23 +0,0 @@ -<head> - {{ HTML.script('static/js/libs/jquery-1.11.1.min.js') |raw }} - {{ HTML.script('static/js/config.js')|raw }} - {{ HTML.script('static/js/task1.js')|raw }} - -</head> - -<body> - -<input type="text" size="1" name="num" min="1" max="10" value="1" class="textField"> -<form> - <input type="button" name="button" value="OK" class='btn'> -</form> - - -<select id="departments"> - {% for f in Departments %} - <option value="{{ f.ID }}"> - {{ f.Name }} - </option> - {% endfor %} -</select> -</body> \ No newline at end of file -- GitLab