Minor UI changes see BT#10849

ofaj
jmontoyaa 9 years ago
parent 81d94453f0
commit 367e79297a
  1. 9
      search.php
  2. 4
      user_portal.php

@ -137,11 +137,12 @@ $(document).ready(function() {
type: "GET", type: "GET",
url: "'.api_get_path(WEB_AJAX_PATH).'extra_field.ajax.php?a=search_options_from_tags&type=session&from=extra_domaine&search="+themeDefault+"&options="+domainListToString, url: "'.api_get_path(WEB_AJAX_PATH).'extra_field.ajax.php?a=search_options_from_tags&type=session&from=extra_domaine&search="+themeDefault+"&options="+domainListToString,
success: function(data) { success: function(data) {
var selectToString = ""; var selectToString = "";
selectToString += "<option></option>";
jQuery.each(JSON.parse(data), function(i, item) { jQuery.each(JSON.parse(data), function(i, item) {
selectToString += "<optgroup label=\'"+item.text+"\'>"; selectToString += "<optgroup label=\'"+item.text+"\'>";
jQuery.each(item.children, function(j, data) { // Add empty value
jQuery.each(item.children, function(j, data) {
if (data.text != "") { if (data.text != "") {
selectToString += "<option value=\'"+data.text+"\'> " +data.text+"</option>" selectToString += "<option value=\'"+data.text+"\'> " +data.text+"</option>"
} }
@ -151,9 +152,11 @@ $(document).ready(function() {
for (i = 0; i <= 5; i++) { for (i = 0; i <= 5; i++) {
var themeId = "#"+themeDefault+"_"+i; var themeId = "#"+themeDefault+"_"+i;
var beforeValue = $(themeId).find(":selected").val()
$(themeId).find("option").remove().end(); $(themeId).find("option").remove().end();
$(themeId).empty(); $(themeId).empty();
$(themeId).html(selectToString); $(themeId).html(selectToString);
$(themeId).val(beforeValue);
$(themeId).selectpicker("refresh"); $(themeId).selectpicker("refresh");
} }
} }

@ -248,7 +248,9 @@ if (api_is_student()) {
'diagnosis_completed' 'diagnosis_completed'
); );
if ($diagnosisComplete === false) { if ($diagnosisComplete === false ||
is_array($diagnosisComplete) && empty($diagnosisComplete['value'])
) {
$url = api_get_path(WEB_PATH).'search.php'; $url = api_get_path(WEB_PATH).'search.php';
$link = Display::url($url, $url); $link = Display::url($url, $url);
Display::addFlash( Display::addFlash(

Loading…
Cancel
Save