In my case I'm using server-side session (not authClient with token in cookies/local storage). So instead of using default LogoutButton I want to place custom button which will do simple "POST /logout" action. There are some examples in docs how to place custom buttons on resource pages, but nothing about sidebar. Any advices/examples?
A custom Sidebar is a custom Menu:
https://marmelab.com/admin-on-rest/AdminResource.html#menu ?
Related
I´m at that point on my app, where the user Logged in, receive the data from the server and now i need to make same changes. One of the changes is change the button that appears on my Sidedrawer saying Log In to Log Out and vice-versa when the user Logs Out...I could talk about other changes but i think the main thing is...
How do I access the Sidedrawer content in order to change/add buttons. I already entered the app-root.xml and made same testing adding the navigatingTo="onNavigatingTo" function and also in the .js file just to see if it responds, but it doesn´t...
How do i perform this?
You can show/hide your button via visibility, text binding or via a structural directive like *ngIf (if using Angular). For example, take a look here - I am showing/hiding a button based on whether the user is logged in or not (here is the related code-behind code).
The above example is using an Angular directive and can be applied only in Angular based applications, but with the same logic, you can substitute ****ngIf*** with visibility and achieve the same in TypeScript or plain JavaScript app.
The easiest way to do it is put the frame inside drawer content area, then navigate frame to another page.
I'm creating a custom tumblr theme. Both the ask (/ask) and custom pages (/whatever-you-want) seem to be considered text posts:
{block:PermalinkPage}
<div>THIS IS A PERMALINK PAGE</div>
{block:Posts}
{block:Text}
{block:Title}<h2>THIS IS THE ASK OR CUSTOM PAGE TITLE: {Title}</h2>{/block:Title}
<!-- BOTH /ASK IFRAME BOX AND CUSTOM PAGES ARE PLACED HERE -->
THIS IS THE ASK IFRAME OR CUSTOM PAGE BODY: {Body}
{/block:Text}
{/block:Posts}
{/block:PermalinkPage}
I want to have a totally different layout for the ask page and the custom pages (no headers or footers on the custom page, no title, etc) and I don't care about the (real) text posts, because I'm not going to use them. Is there a way to have a different content from the "/ask" and the custom page without using javascript? I have read the documentation, but don't see anything that would allow me to do that... Is this possible?
Yes!
Just create a new page (towards the bottom of the Customise options).
If you choose Custom Layout, you can add any html you want and it will be detached from the main template.
Here is an example: http://madox-test.tumblr.com/test
If you check the site root you can see the tumblr template: http://madox-test.tumblr.com (which can still be used for other pages too).
Ref: http://www.tumblr.com/docs/en/pages#layouts
Luke
I need a way to add a menu through the kendo ui.. but the menu needs to be able to only show certain menu items for certain users... ie admin staff should see all menus, while other staff can only see a sub set of those menus... how can I use the authorise attribute to achieve this? any code samples or links would be very helpful
Thanks
VB
Kendo UI supports this out of the box. Just add the Authorize attribute to your actions and use the Kendo server side wrapper:
#(Html.Kendo().Menu()
.Name("menu")
.Items(items =>
{
items.Add()
.Text("Home")
.Action("Index", "Home");
})
)
http://www.kendoui.com/forums/ui/menu/binding-to-sitemap-with-security-trimming-on-roles.aspx
http://docs.kendoui.com/api/wrappers/aspnet-mvc/Kendo.Mvc.UI.Fluent/MenuBuilder
As MVC is convention based you need to be sure you prevent the controller access via the url
On top of just hiding the menus
You’ll need to set up a custom provider so you can work with the roles easier then you’ll need to put the menu into a partial view that builds the menu dynamically.
I dug around and found a site that explains it nicely I think :
Custom provider:
http://techbrij.com/custom-roleprovider-authorization-asp-net-mvc
role based menu:
http://techbrij.com/role-based-menu-asp-net-mvc
I wrote a custom link in my page which created by views module, I want to click it to do something, then the page will refresh by ajax, how do I implement this?
I am sorry I didn't express myself clearly, I use Drupal 7, and the Views module to custom my own page.
You can use this module https://www.drupal.org/project/views_refresh or just use the code below in your JS to refresh the view.
$('.view-dom-id-403402eee35f68cd32fe87b45702dc63').triggerHandler('RefreshView');
Attach an event to the link, and when that is fired, execute an AJAX request.
I am currently in the process of developing a custom joomla module for one of my client’s requirement. As part of the administration panel of that module, I have created a radio button group, well in that group; I have two more radio buttons
My question for you leaders in the web arena is I need an option that "should display extra fields when I select one of the radio buttons"
For example: I have a radio button group named as 'No of fields'. In that group, I have two radio buttons named as 'Show', 'Hide'. I need an option which should display extra fields, when I select 'show' radio button
Is this equation possible? If yes, please post me your thoughts
This kind of behavior is not provided as a part of Joomla's default administration functions. You'll have to code it yourself and call that JS file when the module is opened in the backend. I would recommend you check the code used in Mod_news_pro by Gavick. The module loads a custom JS file that add a lot of custom functions and layout options that wasn't available in Joomla.
It's quite simple, just create a custom element checkout the official docs:
http://docs.joomla.org/Creating_a_custom_form_field_type