Add preview of popup see BT#10849

ofaj
Julio 9 years ago
parent ba9feed407
commit f3f51b6ecf
  1. 4
      main/inc/lib/display.lib.php
  2. 6
      main/template/rainbow/layout/header.js.tpl
  3. 11
      search.php

@ -2302,7 +2302,7 @@ class Display
*
* @return string
*/
public static function panel($content, $title = '', $footer = '', $style = '', $extra = '')
public static function panel($content, $title = '', $footer = '', $style = '', $extra = '', $id = '')
{
$title = !empty($title) ? '<div class="panel-heading"><h3 class="panel-title">'.$title.'</h3>'.$extra.'</div>' : '';
$footer = !empty($footer) ? '<div class="panel-footer ">'.$footer.'</div>' : '';
@ -2310,7 +2310,7 @@ class Display
$style = !in_array($style, $styles) ? 'default' : $style;
return '
<div class="panel panel-'.$style.'">
<div id = '.$id.' class="panel panel-'.$style.'">
'.$title.'
'.self::contentPanel($content).'
'.$footer.'

@ -132,9 +132,15 @@ $(document).ready(function(){
$('body').on('click', 'a.ajax', function(e) {
e.preventDefault();
var panelId = $('#' + this.id+ '_panel');
if (panelId.length) {
var loadModalContent = panelId.html();
self = $(this);
} else {
var contentUrl = this.href,
loadModalContent = $.get(contentUrl),
self = $(this);
}
$.when(loadModalContent).done(function(modalContent) {
var modalDialog = $('#global-modal').find('.modal-dialog'),

@ -205,11 +205,18 @@ if ($form->validate()) {
}
$extraField = new ExtraField('user');
$userForm = new FormValidator('user_form', 'post', api_get_self());
$jqueryExtra = '';
$userForm->addHeader(get_lang('Filière'));
$htmlHeadXtra[] ='<script>
$(document).ready(function(){
$("#filiere_panel").hide();
});
</script>';
$panel = Display::panel(get_lang('FiliereExplanation'), '', '', '', '', 'filiere_panel');
$userForm->addHeader(Display::url(get_lang('Filière'), '#', ['id'=> 'filiere', 'class' => 'ajax']).''.$panel);
$fieldsToShow = [
'statusocial',
'filiere_user',

Loading…
Cancel
Save