remove category selectbox from GUI
This commit is contained in:
@@ -91,12 +91,10 @@ var calcms = (function($) {
|
|||||||
var weekday = my.get('weekday');
|
var weekday = my.get('weekday');
|
||||||
var time = '';
|
var time = '';
|
||||||
var series_name = my.get('series_name');
|
var series_name = my.get('series_name');
|
||||||
var category = my.get('category');
|
|
||||||
var search_field = my.get('search');
|
var search_field = my.get('search');
|
||||||
|
|
||||||
// delete filters by current action
|
// delete filters by current action
|
||||||
if ((field == 'search' && search_field != '')
|
if ((field == 'search' && search_field != '')
|
||||||
|| (field == 'category' && category != '')
|
|
||||||
|| (field == 'series_name' && series_name != '')
|
|| (field == 'series_name' && series_name != '')
|
||||||
) {
|
) {
|
||||||
weekday = '';
|
weekday = '';
|
||||||
@@ -106,13 +104,6 @@ var calcms = (function($) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (field == 'search') {
|
if (field == 'search') {
|
||||||
category = '';
|
|
||||||
series_name = '';
|
|
||||||
program = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (field == 'category') {
|
|
||||||
search_field = '';
|
|
||||||
series_name = '';
|
series_name = '';
|
||||||
program = '';
|
program = '';
|
||||||
}
|
}
|
||||||
@@ -120,7 +111,6 @@ var calcms = (function($) {
|
|||||||
if (field == 'series_name') {
|
if (field == 'series_name') {
|
||||||
search_field = '';
|
search_field = '';
|
||||||
program = '';
|
program = '';
|
||||||
category = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field == 'month') {
|
if (field == 'month') {
|
||||||
@@ -130,7 +120,6 @@ var calcms = (function($) {
|
|||||||
}
|
}
|
||||||
weekday = '';
|
weekday = '';
|
||||||
date = '';
|
date = '';
|
||||||
category = '';
|
|
||||||
series_name = '';
|
series_name = '';
|
||||||
search_field = '';
|
search_field = '';
|
||||||
}
|
}
|
||||||
@@ -138,13 +127,11 @@ var calcms = (function($) {
|
|||||||
if (field == 'week') {
|
if (field == 'week') {
|
||||||
weekday = '';
|
weekday = '';
|
||||||
date = '';
|
date = '';
|
||||||
category = '';
|
|
||||||
series_name = '';
|
series_name = '';
|
||||||
search_field = '';
|
search_field = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field == 'weekday') {
|
if (field == 'weekday') {
|
||||||
category = '';
|
|
||||||
series_name = '';
|
series_name = '';
|
||||||
search_field = '';
|
search_field = '';
|
||||||
}
|
}
|
||||||
@@ -153,7 +140,6 @@ var calcms = (function($) {
|
|||||||
weekday = '';
|
weekday = '';
|
||||||
from_date = '';
|
from_date = '';
|
||||||
till_date = '';
|
till_date = '';
|
||||||
category = '';
|
|
||||||
series_name = '';
|
series_name = '';
|
||||||
search_field = '';
|
search_field = '';
|
||||||
}
|
}
|
||||||
@@ -196,10 +182,6 @@ var calcms = (function($) {
|
|||||||
url += "/suche/" + search_field;
|
url += "/suche/" + search_field;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (category != null && category != '') {
|
|
||||||
url += "/kategorie/" + category;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (series_name != null && series_name != '') {
|
if (series_name != null && series_name != '') {
|
||||||
url += "/sendereihe/" + series_name;
|
url += "/sendereihe/" + series_name;
|
||||||
}
|
}
|
||||||
@@ -219,22 +201,7 @@ var calcms = (function($) {
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
// show current project categories
|
// show current series
|
||||||
my.showProjectCategories = function showProjectCategories(project) {
|
|
||||||
var projectJsName = calcms.getJsName(project);
|
|
||||||
$('#calcmsCategoryForm select').each(function() {
|
|
||||||
var id = $(this).attr('id');
|
|
||||||
if (id == "calcms_category_" + projectJsName) {
|
|
||||||
if ($(this).css('display') == 'none')
|
|
||||||
$(this).show();
|
|
||||||
} else {
|
|
||||||
if ($(this).css('display') != 'none')
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// show current series categories
|
|
||||||
my.showProjectSeriesNames = function showProjectSeriesNames(project) {
|
my.showProjectSeriesNames = function showProjectSeriesNames(project) {
|
||||||
var projectJsName = calcms.getJsName(project);
|
var projectJsName = calcms.getJsName(project);
|
||||||
$('#calcmsSeriesNamesForm select').each(function() {
|
$('#calcmsSeriesNamesForm select').each(function() {
|
||||||
@@ -257,16 +224,14 @@ var calcms = (function($) {
|
|||||||
return project.val();
|
return project.val();
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove projects from form without categories and series_names
|
// remove projects from form without series_names
|
||||||
my.removeEmptyProjects = function removeEmptyProjects() {
|
my.removeEmptyProjects = function removeEmptyProjects() {
|
||||||
$('#calcms_project option').each(
|
$('#calcms_project option').each(
|
||||||
function() {
|
function() {
|
||||||
var project = $(this).val();
|
var project = $(this).val();
|
||||||
var hasCategories = $('#calcms_category_'
|
|
||||||
+ calcms.getJsName(project)).length;
|
|
||||||
var hasSeries = $('#calcms_series_name_'
|
var hasSeries = $('#calcms_series_name_'
|
||||||
+ calcms.getJsName(project)).length;
|
+ calcms.getJsName(project)).length;
|
||||||
if ((hasCategories == 0) && (hasSeries == 0)) {
|
if (hasSeries == 0) {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -301,31 +266,6 @@ var calcms = (function($) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// show all events for a given category
|
|
||||||
my.showEventsByCategory = function showEventsByCategory(value) {
|
|
||||||
if (value != '' && value != null) {
|
|
||||||
my.updateContainer('calcms_list', my.get('search_category_url')
|
|
||||||
+ escape(value) + '/', 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// show all events for a given project and category
|
|
||||||
my.showEventsByProjectAndCategory = function showEventsByProjectAndCategory(
|
|
||||||
project, category, archive) {
|
|
||||||
if (category != '' && category != null) {
|
|
||||||
var url = my.get('search_category_url');
|
|
||||||
if (project != '' && project != null)
|
|
||||||
url += escape(project) + '/';
|
|
||||||
if (category != '' && category != null)
|
|
||||||
url += escape(category) + '/';
|
|
||||||
if (archive != null && archive == 0)
|
|
||||||
url += 'kommende/';
|
|
||||||
if (archive != null && archive == 1)
|
|
||||||
url += 'vergangene/';
|
|
||||||
my.updateContainer('calcms_list', url, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// show all events for a given project and series
|
// show all events for a given project and series
|
||||||
my.showEventsByProjectAndSeriesName = function showEventsByProjectAndSeriesName(
|
my.showEventsByProjectAndSeriesName = function showEventsByProjectAndSeriesName(
|
||||||
project, seriesName, archive) {
|
project, seriesName, archive) {
|
||||||
@@ -587,13 +527,10 @@ var calcms = (function($) {
|
|||||||
// init search interface: load search form content if not loaded yet
|
// init search interface: load search form content if not loaded yet
|
||||||
my.initSearch = function initSearch(target, field) {
|
my.initSearch = function initSearch(target, field) {
|
||||||
if (my.get('preloaded') == '') {
|
if (my.get('preloaded') == '') {
|
||||||
var category_url = my.get('category_url');
|
|
||||||
var program_url = my.get('program_url');
|
var program_url = my.get('program_url');
|
||||||
var series_name_url = my.get('series_name_url');
|
var series_name_url = my.get('series_name_url');
|
||||||
var debug = my.get('debug');
|
var debug = my.get('debug');
|
||||||
|
|
||||||
if (category_url != null && category_url != '')
|
|
||||||
my.updateContainer('calcms_categories', category_url, 1);
|
|
||||||
if (program_url != null && program_url != '')
|
if (program_url != null && program_url != '')
|
||||||
my.updateContainer('calcms_programs', program_url, 1);
|
my.updateContainer('calcms_programs', program_url, 1);
|
||||||
if (series_name_url != null && series_name_url != '')
|
if (series_name_url != null && series_name_url != '')
|
||||||
|
|||||||
Reference in New Issue
Block a user