mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 08:00:02 -06:00
webui: update patternfly to v1.1.4
Not all functionality is available. Mostly because IPA doesn't require them yet. Missing: bootstrap combobox, datatables js, PF font with icons, spinner for old IEs Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
This commit is contained in:
parent
ab69a0b1a7
commit
a4c0f780b7
File diff suppressed because one or more lines are too long
@ -42,6 +42,7 @@
|
||||
'js/libs/json2.js',
|
||||
'js/libs/jquery.js',
|
||||
'js/libs/bootstrap.js',
|
||||
'js/libs/patternfly.js',
|
||||
'js/libs/jquery.ordered-map.js',
|
||||
'js/libs/browser.js',
|
||||
'js/dojo/dojo.js',
|
||||
|
@ -81,10 +81,12 @@
|
||||
@import "@{fontawesome_dir}/less/stacked";
|
||||
@import "@{fontawesome_dir}/less/icons";
|
||||
|
||||
/* Bootstrap-Combobox */
|
||||
//@import "../@{bootstrap_combox_dir}/less/combobox.less";
|
||||
|
||||
/* Bootstrap-Select */
|
||||
@import (less) "@{bootstrap_select_dir}/bootstrap-select.css";
|
||||
|
||||
|
||||
/* PatternFly overrides and new stuff */
|
||||
// Based on "@{patternfly_dir}/less/patternfly.less";
|
||||
@import "@{patternfly_dir}/less/variables";
|
||||
@ -92,10 +94,12 @@
|
||||
@import "@{patternfly_dir}/less/alerts";
|
||||
@import "@{patternfly_dir}/less/badges";
|
||||
@import "@{patternfly_dir}/less/bootstrap-select";
|
||||
@import "@{patternfly_dir}/less/bootstrap-combobox.less";
|
||||
@import "@{patternfly_dir}/less/bootstrap-select.less";
|
||||
@import "@{patternfly_dir}/less/bootstrap-treeview.less";
|
||||
@import "@{patternfly_dir}/less/breadcrumbs";
|
||||
@import "@{patternfly_dir}/less/buttons";
|
||||
@import "@{patternfly_dir}/less/close";
|
||||
@import "@{patternfly_dir}/less/combo-box";
|
||||
@import "@{patternfly_dir}/less/datatables";
|
||||
@import "@{patternfly_dir}/less/dropdowns";
|
||||
//@import "@{patternfly_dir}/less/fonts";
|
||||
@ -112,12 +116,15 @@
|
||||
@import "@{patternfly_dir}/less/pagination";
|
||||
@import "@{patternfly_dir}/less/panels";
|
||||
@import "@{patternfly_dir}/less/popovers";
|
||||
@import "@{patternfly_dir}/less/progress-bars.less";
|
||||
@import "@{patternfly_dir}/less/search.less";
|
||||
@import "@{patternfly_dir}/less/sidebar";
|
||||
@import "@{patternfly_dir}/less/single-select-dropdown";
|
||||
@import "@{patternfly_dir}/less/tabs";
|
||||
@import "@{patternfly_dir}/less/spinner.less";
|
||||
@import "@{patternfly_dir}/less/syntax-highlighting.less";
|
||||
@import "@{patternfly_dir}/less/tables";
|
||||
@import "@{patternfly_dir}/less/type";
|
||||
@import "@{patternfly_dir}/less/tabs";
|
||||
@import "@{patternfly_dir}/less/tooltip";
|
||||
@import "@{patternfly_dir}/less/type";
|
||||
|
||||
// our overrides
|
||||
@fa-font-path: "../fonts/fontawesome";
|
||||
@fa-font-path: "../fonts/fontawesome";
|
||||
|
@ -8,6 +8,7 @@ app_DATA = \
|
||||
jquery.ordered-map.js \
|
||||
json2.js \
|
||||
loader.js \
|
||||
patternfly.js \
|
||||
qrcode.js \
|
||||
$(NULL)
|
||||
|
||||
|
1
install/ui/src/libs/patternfly.js
Normal file
1
install/ui/src/libs/patternfly.js
Normal file
@ -0,0 +1 @@
|
||||
var PatternFly=PatternFly||{};!function($){sidebar=function(){var documentHeight=0,navbarpfHeight=0,colHeight=0;$(".navbar-pf .navbar-toggle").is(":hidden")&&(documentHeight=$(document).height(),navbarpfHeight=$(".navbar-pf").outerHeight(),colHeight=documentHeight-navbarpfHeight),$(".sidebar-pf").parent(".row").children('[class*="col-"]').css({"min-height":colHeight})},$(document).ready(function(){$(".sidebar-pf").length>0&&0==$(".datatable").length&&sidebar()}),$(window).resize(function(){$(".sidebar-pf").length>0&&sidebar()})}(jQuery),function($){PatternFly.popovers=function(selector){var allpopovers=$(selector);allpopovers.popover(),allpopovers.filter("[data-close=true]").each(function(index,element){var $this=$(element),title=$this.attr("data-original-title")+'<button type="button" class="close" aria-hidden="true"><span class="pficon pficon-close"></span></button>';$this.attr("data-original-title",title)}),allpopovers.on("click",function(e){var $this=$(this);$title=$this.next(".popover").find(".popover-title"),$title.find(".close").parent(".popover-title").addClass("closable"),$title.find(".close").on("click",function(){$this.popover("toggle")}),e.preventDefault()})}}(jQuery),function($){$.fn.dataTableExt&&($.extend(!0,$.fn.dataTable.defaults,{bDestroy:!0,bAutoWidth:!1,iDisplayLength:20,sDom:"<'dataTables_header' f i r ><'table-responsive' t ><'dataTables_footer' p >",oLanguage:{sInfo:"Showing <b>_START_</b> to <b>_END_</b> of <b>_TOTAL_</b> Items",sInfoFiltered:"(of <b>_MAX_</b>)",sInfoEmpty:"Showing <b>0</b> Results",sZeroRecords:"<p>Suggestions</p><ul><li>Check the syntax of the search term.</li><li>Check that the correct menu option is chosen (token ID vs. user ID).</li><li>Use wildcards (* to match zero or more characters or ? to match a single character).</li><li>Clear the search field, then click Search to return to the 20 most recent records.</li></ul>",sSearch:""},sPaginationType:"bootstrap_input"}),$.extend($.fn.dataTableExt.oStdClasses,{sWrapper:"dataTables_wrapper"}),$.fn.dataTableExt.oApi.fnPagingInfo=function(oSettings){return{iStart:oSettings._iDisplayStart,iEnd:oSettings.fnDisplayEnd(),iLength:oSettings._iDisplayLength,iTotal:oSettings.fnRecordsTotal(),iFilteredTotal:oSettings.fnRecordsDisplay(),iPage:-1===oSettings._iDisplayLength?0:Math.ceil(oSettings._iDisplayStart/oSettings._iDisplayLength),iTotalPages:-1===oSettings._iDisplayLength?0:Math.ceil(oSettings.fnRecordsDisplay()/oSettings._iDisplayLength)}},$.extend($.fn.dataTableExt.oPagination,{bootstrap_input:{fnInit:function(oSettings,nPaging,fnDraw){var fnClickHandler=(oSettings.oLanguage.oPaginate,function(e){e.preventDefault(),oSettings.oApi._fnPageChange(oSettings,e.data.action)&&fnDraw(oSettings)});$(nPaging).append('<ul class="pagination"><li class="first disabled"><span class="i fa fa-angle-double-left"></span></li><li class="prev disabled"><span class="i fa fa-angle-left"></span></li></ul><div class="pagination-input"><input type="text" class="paginate_input"><span class="paginate_of">of <b>3</b></span></div><ul class="pagination"><li class="next disabled"><span class="i fa fa-angle-right"></span></li><li class="last disabled"><span class="i fa fa-angle-double-right"></span></li></ul>');var els=$("li",nPaging);$(els[0]).bind("click.DT",{action:"first"},fnClickHandler),$(els[1]).bind("click.DT",{action:"previous"},fnClickHandler),$(els[2]).bind("click.DT",{action:"next"},fnClickHandler),$(els[3]).bind("click.DT",{action:"last"},fnClickHandler);var nInput=$("input",nPaging);$(nInput).keyup(function(e){if(38==e.which||39==e.which?this.value++:(37==e.which||40==e.which)&&this.value>1&&this.value--,""!=this.value&&!this.value.match(/[^0-9]/)){var iNewStart=oSettings._iDisplayLength*(this.value-1);if(iNewStart>oSettings.fnRecordsDisplay())return oSettings._iDisplayStart=(Math.ceil((oSettings.fnRecordsDisplay()-1)/oSettings._iDisplayLength)-1)*oSettings._iDisplayLength,void fnDraw(oSettings);oSettings._iDisplayStart=iNewStart,fnDraw(oSettings)}})},fnUpdate:function(oSettings){var i,ien,oPaging=oSettings.oInstance.fnPagingInfo(),an=oSettings.aanFeatures.p,iPages=Math.ceil(oSettings.fnRecordsDisplay()/oSettings._iDisplayLength),iCurrentPage=Math.ceil(oSettings._iDisplayStart/oSettings._iDisplayLength)+1;for(i=0,ien=an.length;ien>i;i++)$(".paginate_input").val(iCurrentPage),$(".paginate_of b").html(iPages),0===oPaging.iPage?($("li.first",an[i]).addClass("disabled"),$("li.prev",an[i]).addClass("disabled")):($("li.first",an[i]).removeClass("disabled"),$("li.prev",an[i]).removeClass("disabled")),oPaging.iPage===oPaging.iTotalPages-1||0===oPaging.iTotalPages?($("li.next",an[i]).addClass("disabled"),$("li.last",an[i]).addClass("disabled")):($("li.next",an[i]).removeClass("disabled"),$("li.last",an[i]).removeClass("disabled"))}}}))}(jQuery);
|
Loading…
Reference in New Issue
Block a user