From efe4e236a153331166beae3f44871fc50690e467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=A0=D1=83=D0=B4?= =?UTF-8?q?=D0=B5=D0=BD=D0=B5=D1=86?= <andrey.rudenets@gmail.com> Date: Mon, 8 Sep 2014 00:04:43 +0400 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20URLdir=20=D0=B8=D0=B7=20config.js=20=D1=82=D0=B5=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D1=8C=20=D1=80=D0=B0=D1=81=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=B0=D0=BD=D1=8F=D0=B5=D1=82=D1=81=D1=8F=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=B2=D1=81=D0=B5=20js-=D1=84=D0=B0=D0=B9=D0=BB=D1=8B?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ~dev_rating/application/views/admin/base.twig | 1 + ~dev_rating/media/js/admin/accounts/codes.js | 6 +-- ~dev_rating/media/js/admin/students/add.js | 4 +- ~dev_rating/media/js/admin/students/index.js | 10 ++-- ~dev_rating/media/js/admin/teachers/add.js | 4 +- ~dev_rating/media/js/admin/teachers/index.js | 10 ++-- ~dev_rating/media/js/config.js | 2 +- ~dev_rating/media/js/discipline/create.js | 2 +- ~dev_rating/media/js/discipline/edit.js | 52 +++++++++---------- ~dev_rating/media/js/discipline/general.js | 2 +- ~dev_rating/media/js/errDialog.js | 6 +-- ~dev_rating/media/js/profileSettings.js | 4 +- ~dev_rating/media/js/rating.js | 2 +- ~dev_rating/media/js/settings.js | 4 +- ~dev_rating/media/js/sign.js | 4 +- ~dev_rating/media/js/student/index.js | 2 +- 16 files changed, 58 insertions(+), 57 deletions(-) diff --git a/~dev_rating/application/views/admin/base.twig b/~dev_rating/application/views/admin/base.twig index 417a9513b..067ded5bb 100644 --- a/~dev_rating/application/views/admin/base.twig +++ b/~dev_rating/application/views/admin/base.twig @@ -36,6 +36,7 @@ {{ HTML.style('media/css/admin/macro.css')|raw }} {{ HTML.style('media/css/actionButton.css')|raw }} {{ HTML.script('media/js/jquery-1.11.1.min.js')|raw }} + {{ HTML.script('media/js/config.js')|raw }} {% block media %}{% endblock %} </head> <body> diff --git a/~dev_rating/media/js/admin/accounts/codes.js b/~dev_rating/media/js/admin/accounts/codes.js index 09474e623..fdd7690d3 100644 --- a/~dev_rating/media/js/admin/accounts/codes.js +++ b/~dev_rating/media/js/admin/accounts/codes.js @@ -25,7 +25,7 @@ $(function() { $('#departmentSelect').attr('disabled', 'disabled'); $("#departmentSelect").html('<option value="0">--- Кафедра ---</option>'); - $.post('/~dev_rating/handler/admTeachers/getDepartmentsList', {'facultyID': $('#facultySelect option:selected').val()}, function(data){ + $.post(URLdir + 'handler/admTeachers/getDepartmentsList', {'facultyID': $('#facultySelect option:selected').val()}, function(data){ $.each(data, function(i){ $("#departmentSelect").append('<option value="'+data[i].ID+'">'+data[i].Name+'</option>'); }); @@ -49,7 +49,7 @@ $(function() $('body').on('click', '#downloadTeacherPDF', function(){ $('#downloadTeacherPDF').attr('disabled', 'disabled'); - $.fileDownload('/~dev_rating/handler/admAccounts/getActivationForTeachers', { + $.fileDownload(URLdir + 'handler/admAccounts/getActivationForTeachers', { httpMethod: "POST", data: { @@ -66,7 +66,7 @@ $(function() $('body').on('click', '#downloadStudentPDF', function(e){ $('#downloadStudentPDF').attr('disabled', 'disabled'); - $.fileDownload('/~dev_rating/handler/admAccounts/getActivationForStudents', { + $.fileDownload(URLdir + 'handler/admAccounts/getActivationForStudents', { httpMethod: "POST", data: { diff --git a/~dev_rating/media/js/admin/students/add.js b/~dev_rating/media/js/admin/students/add.js index 6fc2a40f2..5c1807f99 100644 --- a/~dev_rating/media/js/admin/students/add.js +++ b/~dev_rating/media/js/admin/students/add.js @@ -30,7 +30,7 @@ $(function() $("#studyGroupSelect").html('<option value="0">--- Учебная РіСЂСѓРїРїР° ---</option>'); if (($('#gradeSelect option:selected').val()!= '0')) { - $.post('/~dev_rating/handler/admStudents/getStudyGroups', + $.post(URLdir + 'handler/admStudents/getStudyGroups', { 'facultyID': $('#facultySelect option:selected').val(), 'gradeNum': $('#gradeSelect option:selected').val() @@ -59,7 +59,7 @@ $(function() $('#inputGroupSubmit').click(function(){ $('#inputGroupSubmit').attr('disabled', 'disabled'); - $.post('/~dev_rating/handler/admStudents/createStudent', + $.post(URLdir + 'handler/admStudents/createStudent', { 'firstName': $('#firstName').val(), 'secondName': $('#secondName').val(), diff --git a/~dev_rating/media/js/admin/students/index.js b/~dev_rating/media/js/admin/students/index.js index a47adc365..ddef79b9f 100644 --- a/~dev_rating/media/js/admin/students/index.js +++ b/~dev_rating/media/js/admin/students/index.js @@ -19,12 +19,12 @@ $(function() $('#facultySelect').change(function(){ if (($('#facultySelect option:selected').val()!= '0')) { - $("#search_results").html('<div class="search_load"><img src="/~dev_rating/media/img/load.gif"/></div>'); + $("#search_results").html('<div class="search_load"><img src="' + URLdir + 'media/img/load.gif"/></div>'); $('#gradeSelect').removeAttr('disabled'); $('#studyGroupSelect').attr('disabled', 'disabled'); $("#studyGroupSelect").html('<option value="0">--- Учебная РіСЂСѓРїРїР° ---</option>'); - $.post('/~dev_rating/handler/admStudents/getStudentsByFaculty', + $.post(URLdir + 'handler/admStudents/getStudentsByFaculty', { 'facultyID': $('#facultySelect option:selected').val() }, @@ -46,7 +46,7 @@ $(function() $("#studyGroupSelect").html('<option value="0">--- Учебная РіСЂСѓРїРїР° ---</option>'); if (($('#gradeSelect option:selected').val()!= '0')) { - $.post('/~dev_rating/handler/admStudents/getStudyGroups', + $.post(URLdir + 'handler/admStudents/getStudyGroups', { 'facultyID': $('#facultySelect option:selected').val(), 'gradeNum': $('#gradeSelect option:selected').val() @@ -68,9 +68,9 @@ $(function() // Выбор РіСЂСѓРїРїС‹ $('#studyGroupSelect').change(function(){ - $("#search_results").html('<div class="search_load"><img src="/~dev_rating/media/img/load.gif"/></div>'); + $("#search_results").html('<div class="search_load"><img src="' + URLdir + 'media/img/load.gif"/></div>'); if (($('#studyGroupSelect option:selected').val()!= '0')) { - $.post('/~dev_rating/handler/admStudents/getStudentsByStudyGroup', + $.post(URLdir + 'handler/admStudents/getStudentsByStudyGroup', { 'studyGroupID': $('#studyGroupSelect option:selected').val() }, diff --git a/~dev_rating/media/js/admin/teachers/add.js b/~dev_rating/media/js/admin/teachers/add.js index 33627bac8..726557f34 100644 --- a/~dev_rating/media/js/admin/teachers/add.js +++ b/~dev_rating/media/js/admin/teachers/add.js @@ -10,7 +10,7 @@ $(function() if (($('#facultySelect option:selected').val()!= '0')) { $("#departmentSelect").html('<option value="0">--- Кафедра ---</option>'); $('#departmentSelect').attr('disabled', 'disabled'); - $.post('/~dev_rating/handler/admTeachers/getDepartmentsList', {'facultyID': $('#facultySelect option:selected').val()}, function(data){ + $.post(URLdir + 'handler/admTeachers/getDepartmentsList', {'facultyID': $('#facultySelect option:selected').val()}, function(data){ $.each(data, function(i){ $("#departmentSelect").append('<option value="'+data[i].ID+'">'+data[i].Name+'</option>'); }); @@ -31,7 +31,7 @@ $(function() $('#inputGroupSubmit').click(function(){ $('#inputGroupSubmit').attr('disabled', 'disabled'); - $.post('/~dev_rating/handler/admTeachers/createTeacher', + $.post(URLdir + 'handler/admTeachers/createTeacher', { 'firstName': $('#firstName').val(), 'secondName': $('#secondName').val(), diff --git a/~dev_rating/media/js/admin/teachers/index.js b/~dev_rating/media/js/admin/teachers/index.js index 200119aeb..5f90701de 100644 --- a/~dev_rating/media/js/admin/teachers/index.js +++ b/~dev_rating/media/js/admin/teachers/index.js @@ -16,13 +16,13 @@ $(function() $('#facultySelect').change(function(){ if (($('#facultySelect option:selected').val()!= '0')) { - $("#search_results").html('<div class="search_load"><img src="/~dev_rating/media/img/load.gif"/></div>'); + $("#search_results").html('<div class="search_load"><img src="' + URLdir + 'media/img/load.gif"/></div>'); $("#departmentSelect").html('<option value="0">--- Кафедра ---</option>'); $('#departmentSelect').attr('disabled', 'disabled'); - $.post('/~dev_rating/handler/admTeachers/getTeachersList', {'facultyID': $('#facultySelect option:selected').val(), 'departmentID': '0'}, function(data){ + $.post(URLdir + 'handler/admTeachers/getTeachersList', {'facultyID': $('#facultySelect option:selected').val(), 'departmentID': '0'}, function(data){ $("#search_results").html(data); }); - $.post('/~dev_rating/handler/admTeachers/getDepartmentsList', {'facultyID': $('#facultySelect option:selected').val()}, function(data){ + $.post(URLdir + 'handler/admTeachers/getDepartmentsList', {'facultyID': $('#facultySelect option:selected').val()}, function(data){ $.each(data, function(i){ $("#departmentSelect").append('<option value="'+data[i].ID+'">'+data[i].Name+'</option>'); }); @@ -37,9 +37,9 @@ $(function() // Выбор кафедры $('#departmentSelect').change(function(){ - $("#search_results").html('<div class="search_load"><img src="/~dev_rating/media/img/load.gif"/></div>'); + $("#search_results").html('<div class="search_load"><img src="' + URLdir + 'media/img/load.gif"/></div>'); if (($('#departmentSelect option:selected').val()!= '0')) { - $.post('/~dev_rating/handler/admTeachers/getTeachersList', {'facultyID': '0', 'departmentID': $('#departmentSelect option:selected').val()}, function(data){ + $.post(URLdir + 'handler/admTeachers/getTeachersList', {'facultyID': '0', 'departmentID': $('#departmentSelect option:selected').val()}, function(data){ $("#search_results").html(data); }); } diff --git a/~dev_rating/media/js/config.js b/~dev_rating/media/js/config.js index 6aa184459..4ba9d44e6 100644 --- a/~dev_rating/media/js/config.js +++ b/~dev_rating/media/js/config.js @@ -1 +1 @@ -var URLdir = '/~dev_rating'; \ No newline at end of file +var URLdir = '/~dev_rating/'; \ No newline at end of file diff --git a/~dev_rating/media/js/discipline/create.js b/~dev_rating/media/js/discipline/create.js index ba7d8c42f..7c7d2c2bf 100644 --- a/~dev_rating/media/js/discipline/create.js +++ b/~dev_rating/media/js/discipline/create.js @@ -4,7 +4,7 @@ $(function() { // Рзменения базовых параметров дисциплины $(".AddDiscipline").click(function(){ $.post( - URLdir + '/handler/map/AddDiscipline', + URLdir + 'handler/map/AddDiscipline', { 'Grade': $('.SelectGrade').val(), 'SubjectID': $('.SelectSubject').val(), diff --git a/~dev_rating/media/js/discipline/edit.js b/~dev_rating/media/js/discipline/edit.js index fdb098e87..0177bfdb0 100644 --- a/~dev_rating/media/js/discipline/edit.js +++ b/~dev_rating/media/js/discipline/edit.js @@ -66,7 +66,7 @@ $(function() { // Рзменение типа подмодуля function ChangeSubmoduleControlType(ID, ControlType){ $.post( - URLdir + '/handler/map/ChangeSubmoduleControlType', + URLdir + 'handler/map/ChangeSubmoduleControlType', { 'SubmoduleID': ID, 'ControlType': ControlType @@ -83,7 +83,7 @@ $(function() { // Рзменение макс. балла подмодуля function ChangeSubmoduleMaxRate(ID, NewMaxRate) { $.post( - URLdir + '/handler/map/ChangeSubmoduleMaxRate', + URLdir + 'handler/map/ChangeSubmoduleMaxRate', { 'SubmoduleID': ID, 'MaxRate': NewMaxRate @@ -160,7 +160,7 @@ $(function() { // Поменять местами РґРІР° модуля function SwapModuleOrder(ModuleID1, ModuleID2) { $.post( - URLdir + '/handler/map/SwapModuleOrder', + URLdir + 'handler/map/SwapModuleOrder', { 'ModuleID1': ModuleID1, 'ModuleID2': ModuleID2 @@ -177,7 +177,7 @@ $(function() { // Поменять местами РґРІР° мероприятия function SwapSubmoduleOrder(SubmoduleID1, SubmoduleID2) { $.post( - URLdir + '/handler/map/SwapSubmoduleOrder', + URLdir + 'handler/map/SwapSubmoduleOrder', { 'SubmoduleID1': SubmoduleID1, 'SubmoduleID2': SubmoduleID2 @@ -198,7 +198,7 @@ $(function() { // Рзменение предмета $('.SelectSubject').change(function(){ $.post( - URLdir + '/handler/map/ChangeDisciplineSubject', + URLdir + 'handler/map/ChangeDisciplineSubject', { 'DisciplineID': DisciplineID, 'SubjectID': $('.SelectSubject').val() @@ -215,7 +215,7 @@ $(function() { // Рзменение РєСѓСЂСЃР° $('.SelectDisGrade').change(function(){ // SelectGrade совпадает СЃ РґСЂСѓРіРёРј, поэтому SelectDisGrade $.post( - URLdir + '/handler/map/ChangeDisciplineGrade', + URLdir + 'handler/map/ChangeDisciplineGrade', { 'DisciplineID': DisciplineID, 'GradeID': $('.SelectDisGrade').val() @@ -232,7 +232,7 @@ $(function() { // Рзменение контроля $('.ExamType').change(function(){ $.post( - URLdir + '/handler/map/ChangeDisciplineControl', + URLdir + 'handler/map/ChangeDisciplineControl', { 'DisciplineID': DisciplineID, 'Control': $('input:radio[name=ExamType]:checked').val() @@ -249,7 +249,7 @@ $(function() { // Рзменение лекционных часов $('.InputLectionCount').focusout(function(){ $.post( - URLdir + '/handler/map/ChangeDisciplineHours', + URLdir + 'handler/map/ChangeDisciplineHours', { 'DisciplineID': DisciplineID, 'Hours': $('.InputLectionCount').val(), @@ -267,7 +267,7 @@ $(function() { // Рзменение практических часов $('.InputPracticeCount').focusout(function(){ $.post( - URLdir + '/handler/map/ChangeDisciplineHours', + URLdir + 'handler/map/ChangeDisciplineHours', { 'DisciplineID': DisciplineID, 'Hours': $('.InputPracticeCount').val(), @@ -364,7 +364,7 @@ $(function() { $('.addModule').click(function(){ var OrderNum = $('.moduleGroup', '.moduleList').last().index('.moduleGroup') + 2; $.post( - URLdir + '/handler/map/AddModule', + URLdir + 'handler/map/AddModule', { 'DisciplineID': DisciplineID, // 'OrderNum': OrderNum @@ -422,7 +422,7 @@ $(function() { var SubmodulesDIV = $(this).siblings('.subModules'); var OrderNum = SubmodulesDIV.children('.subModule').last().index() + 2; $.post( - URLdir + '/handler/map/AddSubmodule', + URLdir + 'handler/map/AddSubmodule', { 'ModuleID': ModuleID //'OrderNum': OrderNum @@ -465,7 +465,7 @@ $(function() { var ChangeOrderModulesID = '[' + AttrID.get() + ']'; // $.post( - URLdir + '/handler/map/DeleteModule', + URLdir + 'handler/map/DeleteModule', { 'ModuleID': $(this).parent('div').parent('div').parent('div').attr('id'), 'SubmodulesID': JSONSubmodules, @@ -503,7 +503,7 @@ $(function() { var ChangeOrderSubmodulesID = '[' + AttrID.get() + ']'; // $.post( - URLdir + '/handler/map/DeleteSubmodule', + URLdir + 'handler/map/DeleteSubmodule', { 'SubmoduleID': $(this).parent('div').parent('div').attr('id'), 'CurrentSubmoduleOrder': CurrentSubmoduleOrder, @@ -536,7 +536,7 @@ $(function() { if (NewModuleName != '' && ModuleName != NewModuleName) { var ID = $(this).parent('div').parent('div').parent('div').attr('id'); $.post( - URLdir + '/handler/map/ChangeModuleName', + URLdir + 'handler/map/ChangeModuleName', { 'ModuleID': ID, 'ModuleName': NewModuleName @@ -566,7 +566,7 @@ $(function() { if (NewSubmoduleName != '' && SubmoduleName != NewSubmoduleName) { var ID = $(this).parent('div').parent('div').attr('id'); $.post( - URLdir + '/handler/map/ChangeSubmoduleName', + URLdir + 'handler/map/ChangeSubmoduleName', { 'SubmoduleID': ID, 'SubmoduleName': NewSubmoduleName @@ -631,7 +631,7 @@ $('.AttachGroupButton').click(function(){ var StudyGroupID = $('.SelectStudyGroup').val(); var StudyGroupName = $(".SelectStudyGroup option:selected").text(); $.post( - URLdir + '/handler/map/BindGroup', + URLdir + 'handler/map/BindGroup', { 'StudyGroupID': StudyGroupID, 'DisciplineID': DisciplineID @@ -652,7 +652,7 @@ $('.AttachedGroupsList').on('click', '.UnbindGroup', function(){ var StudyGroupID = $(this).parent().attr('id'); var GroupDIV = $(this).parent(); $.post( - URLdir + '/handler/map/UnbindGroup', + URLdir + 'handler/map/UnbindGroup', { 'StudyGroupID': StudyGroupID, 'DisciplineID': DisciplineID @@ -711,7 +711,7 @@ function CallSearchStudents() { if ($('.InputStudentName ').val() > 0) Name = ($('.InputStudentName ').val()).split(' '); $.post( - URLdir + '/handler/map/SearchStudents', + URLdir + 'handler/map/SearchStudents', { 'GradeID': $('.SelectGrade').val(), 'GroupN': $('.SelectStudyGroup').val(), @@ -740,7 +740,7 @@ function CallSearchStudents() { $('.SelectGrade').change(function(){ $.post( - URLdir + '/handler/map/GetStudyGroups', + URLdir + 'handler/map/GetStudyGroups', { 'FacultyID': FacultyID, 'GradeID': $('.SelectGrade').val() @@ -816,7 +816,7 @@ $('.StudentsList').on('click', '.Action_BindStudent', function(){ var thisObj = $(this); var ID = $(this).parent().attr('id'); $.post( - URLdir + '/handler/map/BindStudent', + URLdir + 'handler/map/BindStudent', { 'StudentID': ID, 'DisciplineID': DisciplineID @@ -837,7 +837,7 @@ $('.StudentsList').on('click', '.Action_BindStudentFromSearch', function(){ var thisObj = $(this); var ID = $(this).parent().attr('id'); $.post( - URLdir + '/handler/map/BindStudent', + URLdir + 'handler/map/BindStudent', { 'StudentID': ID, 'DisciplineID': DisciplineID @@ -865,7 +865,7 @@ $('.StudentsList').on('click', '.Action_UnbindStudent', function(){ .addClass('StatusUnbind'); var ID = $(this).parent().attr('id'); $.post( - URLdir + '/handler/map/UnbindStudent', + URLdir + 'handler/map/UnbindStudent', { 'StudentID': ID, 'DisciplineID': DisciplineID @@ -910,7 +910,7 @@ function CallSearchTeachers(){ var Name = []; Name = ($('.InputTeacherName ').val()).split(' '); $.post( - URLdir + '/handler/map/SearchTeachers', + URLdir + 'handler/map/SearchTeachers', { 'FacultyID': $('.SelectFaculty').val(), 'DepartmentID': $('.SelectDepartment').val(), @@ -938,7 +938,7 @@ function CallSearchTeachers(){ // Выборка кафедр $('.SelectFaculty').change(function(){ $.post( - URLdir + '/handler/map/GetDepartments', + URLdir + 'handler/map/GetDepartments', { 'FacultyID': $('.SelectFaculty').val() }, @@ -987,7 +987,7 @@ $('.TeachersList').on('click', '.Action_UnbindTeacher', function(){ .remove(); var ID = $(this).parent().attr('id'); $.post( - URLdir + '/handler/map/UnbindTeacher', + URLdir + 'handler/map/UnbindTeacher', { 'BindingTeacher': ID, 'DisciplineID': DisciplineID @@ -1009,7 +1009,7 @@ $('.TeachersList').on('click', '.Action_BindTeacher', function(){ var ID = $(this).parent().attr('id'); var Name = $(this).siblings('.Name').text(); $.post( - URLdir + '/handler/map/BindTeacher', + URLdir + 'handler/map/BindTeacher', { 'BindingTeacher': ID, 'DisciplineID': DisciplineID diff --git a/~dev_rating/media/js/discipline/general.js b/~dev_rating/media/js/discipline/general.js index 2a62b46fa..5c5041d31 100644 --- a/~dev_rating/media/js/discipline/general.js +++ b/~dev_rating/media/js/discipline/general.js @@ -8,7 +8,7 @@ $(function() { if (parseInt($('.SelectFaculty option:selected').val()) > 0) var Faculty = $('.SelectFaculty option:selected').val(); $.post( - URLdir + '/handler/map/GetSubjectsList', + URLdir + 'handler/map/GetSubjectsList', { 'FacultyID': Faculty }, diff --git a/~dev_rating/media/js/errDialog.js b/~dev_rating/media/js/errDialog.js index acee99d60..0fbebdff2 100644 --- a/~dev_rating/media/js/errDialog.js +++ b/~dev_rating/media/js/errDialog.js @@ -18,7 +18,7 @@ $(document).ready(function() { $.ajax({ type: "POST", - url: "/~dev_rating/~dev_rating/handler/baseDialog/returnDialogHtml", //////////// ------------------------- Костыль + url: URLdir + "handler/baseDialog/returnDialogHtml", //////////// ------------------------- Костыль data: {}, success: function(html){ data = html; @@ -29,7 +29,7 @@ $(document).ready(function() { if(!checkMessages) { - $.getJSON("/~dev_rating/~dev_rating/handler/errMessages/getRequests", {}, function(data){ //----------------------- Костыль + $.getJSON(URLdir + "handler/errMessages/getRequests", {}, function(data){ //----------------------- Костыль // var date = data['Date']; // var text = data['Description']; @@ -70,7 +70,7 @@ $(document).ready(function() { $.ajax({ type: "POST", - url: "/~dev_rating/~dev_rating/handler/errMessages/createRequest", //----------------------- Костыль + url: URLdir + "handler/errMessages/createRequest", //----------------------- Костыль data: {title: mesTitle, text: mesText}, success: function(html){ $('#errDialog').dialog("close"); diff --git a/~dev_rating/media/js/profileSettings.js b/~dev_rating/media/js/profileSettings.js index 41de2da86..3a7594d21 100644 --- a/~dev_rating/media/js/profileSettings.js +++ b/~dev_rating/media/js/profileSettings.js @@ -9,7 +9,7 @@ $(function() if (($('#facultySelect option:selected').val()!= '0')) { $("#departmentSelect").html('<option value="0">--- Кафедра ---</option>'); $('#departmentSelect').attr('disabled', 'disabled'); - $.post('/~dev_rating/handler/settings/getDepartmentsList', {'facultyID': $('#facultySelect option:selected').val()}, function(data){ + $.post(URLdir + 'handler/settings/getDepartmentsList', {'facultyID': $('#facultySelect option:selected').val()}, function(data){ $.each(data, function(i){ $("#departmentSelect").append('<option value="'+data[i].ID+'">'+data[i].Name+'</option>'); }); @@ -30,7 +30,7 @@ $(function() $('#inputGroupSubmit').click(function(){ $('#inputGroupSubmit').attr('disabled', 'disabled'); - $.post('/~dev_rating/handler/settings/editProfile', + $.post(URLdir + 'handler/settings/editProfile', { 'firstName': $('#firstName').val(), 'secondName': $('#secondName').val(), diff --git a/~dev_rating/media/js/rating.js b/~dev_rating/media/js/rating.js index 410d3e840..2fc5b360a 100644 --- a/~dev_rating/media/js/rating.js +++ b/~dev_rating/media/js/rating.js @@ -47,7 +47,7 @@ $(function() { if (parseInt(NewRate) <= parseInt(MaxRate)) { $.post( - URLdir + '/handler/rating/setRate', + URLdir + 'handler/rating/setRate', { 'student': StudentID, 'submodule': SubmoduleID, diff --git a/~dev_rating/media/js/settings.js b/~dev_rating/media/js/settings.js index 35e1c8339..d5e4df86b 100644 --- a/~dev_rating/media/js/settings.js +++ b/~dev_rating/media/js/settings.js @@ -25,7 +25,7 @@ $(function() { else checkInput['login'] = false; if (checkInput['login'] == true) - $.post('/~dev_rating/handler/settings/changeLogin', {'login': $('.inputLogin').val()}, + $.post(URLdir + 'handler/settings/changeLogin', {'login': $('.inputLogin').val()}, function(data){ data = $.parseJSON(data); if(data.success === true) { @@ -65,7 +65,7 @@ $(function() { checkInput['confirmPass'] = false; if (checkInput['confirmPass'] == true) - $.post('/~dev_rating/handler/settings/changePassword', + $.post(URLdir + 'handler/settings/changePassword', { 'old_password': $('.inputCurrentPass').val(), 'password': $('.inputNewPass').val(), diff --git a/~dev_rating/media/js/sign.js b/~dev_rating/media/js/sign.js index 755faf7b9..b4088162d 100644 --- a/~dev_rating/media/js/sign.js +++ b/~dev_rating/media/js/sign.js @@ -3,7 +3,7 @@ $(function() $('#signin_b').click(function() { - $.post('/~dev_rating/handler/sign/in', {'login': $('#login').val(), 'password': $('#password').val()}, + $.post(URLdir + 'handler/sign/in', {'login': $('#login').val(), 'password': $('#password').val()}, function(data) { data = $.parseJSON(data); @@ -23,7 +23,7 @@ $(function() $('#signup_b').click(function() { - $.post('/~dev_rating/handler/sign/up', + $.post(URLdir + 'handler/sign/up', {'activation_code': $('#activation_code').val(), 'login': $('#login').val(), 'password': $('#password').val(), diff --git a/~dev_rating/media/js/student/index.js b/~dev_rating/media/js/student/index.js index 1b6192a4c..b82424eca 100644 --- a/~dev_rating/media/js/student/index.js +++ b/~dev_rating/media/js/student/index.js @@ -1,7 +1,7 @@ $(function() { $('#openHelp').click(function() { - $.get('/~dev_rating/handler/GetHelp/indexStudent', {}, + $.get(URLdir + 'handler/GetHelp/indexStudent', {}, function(data) { wnd.open({title: "Цветовая схема", content: data, width: 700}); -- GitLab