自定义新的Grails Spring Security Core Plugin登录页面(Customizing new Grails Spring Security Core Plugin login page)
我安装了Grails Spring安全核心插件,它运行良好,但我找不到登录页面的gsp文件。 我想更改登录页面以匹配我的网页主题。 有谁知道如何找到该文件? 我尝试了generate-views和generate-all,然后是User,UserRole和Role域类,但我没有看到实际的文件。 另外,我在项目目录中找不到spring security core插件的登录和注销控制器。 知道发生了什么事吗?
I installed Grails Spring Security Core Plugin and it works great, but I can't find the gsp file for the login page. I want to change the login page to match my web theme. Anyone knows how to find the file ? I tried generate-views and also generate-all followed by User, UserRole, and Role domain classes but I didn't see the actual files. Also I can't find the login and logout controllers for the spring security core plugin in my project directories. Any idea what's going on ?
原文:https://stackoverflow.com/questions/20183312
最满意答案
首先在DOM文档中包含结果元素,然后尝试宽度
success: function(data) { var result = jQuery(data).find('.dir_content'); // get element with find here jQuery('.list-inline').append(result); var margin_amount = getScreenMiddle(result); // pass element to function result.attr('id', full_path); result.css('margin-right', margin_amount); if(prev_element != null) { prev_element.css("margin-right", 0); } prev_element = result; },
First include the result element in DOM document and then try for width
success: function(data) { var result = jQuery(data).find('.dir_content'); // get element with find here jQuery('.list-inline').append(result); var margin_amount = getScreenMiddle(result); // pass element to function result.attr('id', full_path); result.css('margin-right', margin_amount); if(prev_element != null) { prev_element.css("margin-right", 0); } prev_element = result; },
相关问答
更多-
LINUX 如何查看JPG文件[2022-06-13]
find -
在Internet Explorer中获取没有填充的元素的宽度(getting the Width of an element without padding in Internet Explorer)[2022-03-29]
您可以使填充为0,但检查大小和位置的计算样式通常是错误的,并且难以协调acreoss浏览器。 在所有浏览器上使用offsetWidth或clientWidth。 You can make the padding 0, but checking computed styles for sizes and positions is often buggy and hard to reconcile acreoss browsers. Use offsetWidth or clientWidth instead, ... -
这是获取滚动条宽度的函数: function getScrollBarWidth() { var inner = $('', {style:'width:100%;height:200px;'}), outer = $('', {style:'position:absolute;top:0;left:0;visibility:hidden;width:200px;height:150px;overflow:hidden;'}); outer.appe ...
-
从.css()函数的文档: 从jQuery 1.6开始, .css()接受与.animate()类似的相对值。 相对值是以+=或-=开始的字符串,用于递增或递减当前值。 例如,如果一个元素的填充左边是10px,则.css( "padding-left", "+=15" )会导致总共填充25px左边。 所以你可以这样做: $el.find( '.ui-content' ) .css('width', '-=19'); From the documentation of the .css() function ...
-
即使浏览器窗口改变大小,jQuery也会找出元素宽度(jQuery find out element width even when browser window changes size)[2022-04-16]
将代码移动到单独的函数,并使其在document ready和window resize事件上运行: function resizeElements() { // find out the width of the page var pageWidth = $('div.MainContentHolder').width(); // minus the sidebar and margin width var middleWidth = pageWidth - '220'; ... -
如何找到内部元素的宽度(How to find width of inner elements)[2022-01-11]
如果你需要所有的嵌套元素,可以用*选择器来搜索,它将返回所有的后代元素: var widthArray=$('#box *').map(function(){ return $(this).outerWidth(); }).get(); var maxWIdth= Math.max.apply(Math, widthArray); 对于儿童: var widthArray=$('#box').children().map(function(){.... If you need all neste ... -
不,你不能在CSS中这样做。 但是,您可以在版本8之前的Internet Explorer中使用它: width: expression(document.getElementById("grandfather").style.width); #grandfather { width: 70%; border: 1px solid #666; padding: 5px; } .father { width: 80%; border: 1px solid #999; ...
-
首先在DOM文档中包含结果元素,然后尝试宽度 success: function(data) { var result = jQuery(data).find('.dir_content'); // get element with find here jQuery('.list-inline').append(result); var margin_amount = getScreenMiddle(result); // pass element to ...
-
元素的真实宽度(True width of an element)[2022-06-04]
document.getElementById('Long').scrollWidth 有关MDN的文档 一个相关的问题 document.getElementById('Long').scrollWidth Documentation on MDN A related question -
使用.find()的jQuery无法获得动态追加元素的宽度(jQuery using .find() can't get width of dynamically appended element)[2022-05-07]
这行$(document).find('#divAppended')返回一个空数组,因为该元素在该点不存在。 jQuery已经评估了选择器并且什么也没找到,你需要在添加元素之后执行它。 您可以将divInDom和divAppended实现为在每次调用时评估选择器的函数。 $(document).ready(function() { var myStuff = { elements: { divInDom: function() { ...