Disable Ribbon Button - button

I want to disable and NOT hide a ribbon button (specifically Ribbon.ListItem.New.NewListItem) on a particular List type. On web I could find a lot many posts showing me ways to remove/hide buttons but none really worthwhile which could tell me how can I just disable an alrteady existing sharepoint button in my custom List type.
e.g. Following code does remove the button instead of hiding.
Id="RemoveRibbonButton"
RegistrationType="List"
RegistrationId="213908"
Location="CommandUI.Ribbon">

This can be done through Javascript on the client side. Check out this article for an example.
http://makarandrkulkarni.blogspot.com/2010/01/sharepoint-2010-ribbon-customization_23.html

Related

Nested getcmsfields_forpopup showing in same popup in silverstripe

I have form in getcmsfields_forpopup for backend(admin panel) in silverstrip. In that form, I have added nested dataobjectmanager field to enter multiple dates(has_many relation). When main form open in popup window and I click on add date link, then second popup form open in the same window not in separate one. That means after entering date data and saving it, when I click on close button, whole form is closed rather going back to main form. Please help in this regard.
This can't be done using SilverStripe's default popup form unless, maybe, you extended the DataObject Manager field and had it render itself in an iFrame.
The best option would be to manage your parent DataObjects with DataObjectManger as well. DataObjectManager supports nested DataObjectManager fields. See this tutorial "Nested DataObjectManager" (on YouTube).
If you're able, can I suggest that you try out SilverStripe 3.0? The support for this kind of thing is much better in SilverStripe 3.0 than it is in 2.4.

How to create custom horizontal radio buttons with CSS?

I want to create radio buttons or other type of controls that will act like this:
[_value1_] [value2] [value3]
Value1 is selected, so it looks like pressed button or selected link (bold, no underline) and other elements are active buttons/links. When user select another value - state is changed. I can handle this event manually, question is - what plugin or existing css/js combination should I use to achieve this?
I am pretty sure that this type of controls have a name, but can't think out what is this. I have tried to search for custom style radio buttons, as functionality is the same, but failed. Also I have tried some other names such as switch buttons, but it's not what I want. It's also very similar to tabs, but tabs usually styled as something that require underline div attached. So I am looking for "radio button meet tabs" css/js solution.
Can you help me to name this control, if you know it's name, or find plugin/existing code that can help me to achieve my goal?
The question is not how to create this type of functionality myself, I can do it, but it's rather strange that there are no existing solutions and I want to help people in same situation, also may be existing solutions design can be better than I can invent myself, because I am not a designer.
Answer
This type of controls can be found as "Simplified CSS Tabs" or "CSS Mini Tabs", but they require some additional code to work as expected.
Also, this type of functionality can be found in Google as jQuery UI radio buttons transformed into a button set and Yahoo UI Button Control: Radio Buttons
http://jqueryui.com/demos/button/#radio
works done for ya bud :)

How to make an entire jqGrid disabled/readonly

How can I make an entire jqGrid disabled/readonly?
I have a page with a logical "edit section" which I show when the user selects something to edit, and hide when the user is done editing (save or cancel). While the edit section is shown, I disable several other elements on the page. I would like to disable their ability to click in the jqGrid, so they can't change selected rows, re-sort, etc. But I cannot find a way to disable/enable the grid as a whole.
Apologies if this has been answered already - other questions seemed to focus on disabling only certain behaviors within the jqGrid.
Edit: Preferably, I'd like an approach that isn't dependent on yet another 3rd-party addon. Nothing wrong with them, of course! But my client has a degree of reluctance with them, so my life would be a little easier with a purely jQuery/jQueryUI/jqGrid solution. :)
You could use blockUI to block the grid.
Try using $("#lui_" + myGridId).show().
The grid has created this overlay internally an uses it as one part of the loader message.
You can just show it or hide it and it will disable/enable the grid for you.

How to make Qt widgets do not react on mouse click

I need on my form ordinary widgets (e.g. buttons) do not react on mouse clicks but NOT to be disabled (it change look to grayed one -- not good).
I wonder is there some neat small hack for this?
You could stick in an event filter and filter out the mouse events before passing the remaining events on for processing, but I'm not sure that not giving the user a visual clue that certain elements are effectively disabled is such a good idea.
You could try using style sheets to control how the disabled mode of the buttons in your form get styled. Unfortunately I'm not sure exactly how to do that but you could have a look at the style sheet docs to get you started.

Detecting out-of-view flex controls

In my flex app I have custom tooltips on buttons that hide and show based on user context.
The problem that I dealing with is that when I call my showTips() function I only want to show tooltips on the buttons that visible in the view. So buttons that on a un-selected tab (tabNavigator) should not show the tooltips.
For some reason all tooltips are showing.
Is there a way to detect if a button is not in current view, like on a un-selected tab?
If you gave us some code I could check this out, but would this work?
if(button.parent.visible) { showTip(button);}
Instead of custom coding for each button, make use your tabnavigator's creation policy is set to "auto".
Check this link for more details
http://livedocs.adobe.com/flex/3/html/help.html?content=layoutperformance_05.html

Resources