Image options to customize the visibility of tabs - jodit

Expected behaviour: With respect to my use case, when the user clicks on image button, I must allow the user to only upload the image and hence I have to hide the URL tab.
Actual behaviour: Currently there is no such option to hide the URL and to display only upload tab.

Related

How to display images accourding to choise from dropdown?

I'm creating a Django website where I want to implement such functionality.
There will be one Dropdown list and one submit button. When user selects any item from dropdown list - An image according to user selection will be displayed.
ie. There's drop-down list containing names of animals and one submit button. When user selects any animal from list, photo/details of that animal should appear before pressing submit button.
I don't know how to create link between them. Any reference to such work or advice would be appreciate.
Thank you :)
You likely want to use async request with JavaScript here (look for AJAX or JS Fetch API)
Attach it to onchange event of select element and send it's value to django.
Django will have a view that processes this request and returns a JsonResponse with image url.
Alternatively you can load all urls before hand and just select them on page without request, but anyway if you don't want to press button to take change - you need JavaScript.

How to hide superfish menu from login page in drupal 7

I have configured the superfish block to display on all pages EXCEPT the user-login page but this is not being honored. I've also created a superfish menu block with no menu items and have configured to ONLY show on the user-login page but this is not being honored.
Why am I trying to do this? There are 3 dummy menu items (not associated with pages) which I cannot make 'disappear' via context rule e.g. only show when user == authorized user (see screen capture).
So if someone knows how to hide the dummy menu items or the whole superfish block from the login screen - please share - it would be appreciated.
Login Screen Image
I just checked it on one of my sites ... it should work when you add "user" in the display section of the block config page. (you may have to clear the cache)... But than, the block is also hidden on all user pages for autorized users..
Other options: "hook preprocess_page" or just a seperate page template ("page--user.tpl.php")...

Orchard CMS - limiting pages to only a specific layer - how?

Silly really - but I just can't seem to find my way around this just yet....
I installed the Orchard CMS in Azure - worked like a charm, added a few pages, played around, watched the Pluralsight "Orchard Fundamentals" course - seemed to make a lot of sense.
But now I'm stuck - I'm trying to create a public facing site, where some of the pages should be visible to any visitor including anonymous users, and some of course should be visible to only authenticated users.
OK, so I understand those are layers in play - default for everyone, authenticated for authenticated users - great. But how do I limit a given page which is present as Content in my dashboard so that it'll be displayed only on a given layer (e.g. only on the authenticated layer - not the default layer for everyone)
Seems like a simple task - but I just cannot seem to find the way to do it (nor does any of the docs or tutorial videos really help :-( )
Any takers?
Layers are only for widgets. In order to restrict access to a content item such as a page, what you need is content item permissions. That's a separate feature that is not enabled by default.
To enabled the Content Item Permissions module
In the admin panel go to Modules
Start typing permissions into the filter box at the top left hand corner of the tabs.
The Content Item Permissions should be shown in the list, click Enable in the top right hand corner of its box
This will reload the page and you should see a message at the top saying Content Item Permissions was enabled
Enabling this feature with your pages
Orchard CMS uses a concept where you can glue components together however you want them to be composed in order for them to support the features you want. The concept of a page is just a collection of parts like a page title, a url, text, setting a publish date and things like that.
By default simply enabling the module doesn't make any difference. You will need to add the feature to the Page content. To do this you just need to:
In the admin panel go to Content Definition
Find / filter the Page content type and click Edit on the right hand side
Scroll down to Parts and click Add Parts
Search for Content Permissions in the list, tick the checkbox and press Save at the bottom of the page
You will be taken back to the Page content definition screen. At the bottom of the Parts list you will now see a Content Permissions entry. If you want to set up defaults for new pages click the little > arrow to the left of the header and a panel will expand.
If you want to add it to other content types such as blog posts then you can repeat this process and add it to any content type you want to.
Making an individual page password protected
Now that the feature is enabled and attached to your Page content type you can create a new private page by following these steps:
In the admin panel click New > Page in the sidebar
Give the page some basic content
Scroll down close to the end of the page and tick the checkbox labelled Enable Content Item access control
Let's say you want to make it so anon uses cannot see the page. Under the View this item section just tick all of the roles except for Anonymous (the second one in the list)
Publish the page
Open up a new incognito / in-private browser tab (so the site thinks you aren't logged in) and visit the new page you just published.
You will be redirected to an error screen similar to this page:
You will want to enable the Content Item Permissions feature in order to restrict individual content items to certain permissions. With layers you can only make widgets appear in different zones defined in your theme when the layer's rules are met.
To enable the Content Item Permissions feature, go to your admin dashboard and click on "Modules" on the left hand side. On the modules page enter "Content Item Permissions" in the filter text box to help find the feature. Click on the enable button of the feature in the top right corner. The feature will now be enabled.
Now that you have the feature enabled, you need to add the Content Permissions part to one of your content definitions. To do this click on "Content Definition" on the left hand side of the admin dashboard. Find the content type you want to add permissions to (for instance, Page) and click the edit button. Click the Add Parts button. You will see a list of parts you can add to the content type. Check the checkbox next to Content Permissions and click save.
Next, in the admin dashboard go to one of your content items that is of the content type that you just added the content permissions part to. You will see a new checkbox towards the bottom to enable content item access control. Click the checkbox and you will be able to set the different roles for that content item.
Edit: It looks like it took me too long to write my response. rtpHarry's editted answer is very similar but better formatted.

How to force a page to be displayed inside an ext:Panel?

This is about ext.net.
I have a link in West section, by clicking which, a webpage should be displayed in the Center section in a tab. But how to prevent the page from being rendered in a new browser window or tab (by shift click, or right click, then pick open in a new tab)?
I can suggest to use a LinkButton (if you really need your link to look as a link).
http://examples.ext.net/#/Buttons/Basic/LinkButton/
Handle its Click event and load any URL to the Center region.
App.PanelCenter.load({ url: "some URL" });
PanelCenter should be configured with a respective Loader.
Hope this helps.

SharePoint Dataform webpart redirection issue

I have two web parts in my sharepoint aspx web page. One is Content editor web part and the other is data form web part.
In data form web part, I have a data view and I need to pass a parameter "id" to this dataview which will show the project details in the data view. I tried to use a value from a control as a parameter and never had a success. I did googled a lot last few days and haven't found any solution. It would be great, if someone show me a way to use the text from a control (may be a text box or select control). if someone have a working sample, please share. Alternatively I have used a query string as a parameter (eventhough I prefer to use text from a control). We need to pass a query string called id. For example, I am navigating to http://localhost/pages/1.aspx?id=7. This will show the project details of project id 7 in data form web part. this works fine.
I need to provide an option to user to enter the project id instead of modifying the query string in url. To achieve that I used content editor web part and I have a text box text1 and a submit button (html controls). The user will enter project id in the text box provided and will click the submit button to view the project details in dataview. The submit button javascript code has the following code:
url = 'http://localhost/pages/1.aspx?id=7';
alert (url); //alerts as http://localhost/pages/1.aspx?id=7
window.location = url;
For testing purpose, I just hardcoded the url. However, clicking the submit button is not redirecting to http://localhost/pages/1.aspx?id=7 or something happens during redirect. The page just reloads once. i.e., if I am in http://localhost/pages/1.aspx?id=12 and clicking the submit button reloads the page http://localhost/pages/1.aspx?id=12 instead of navigating to http://localhost/pages/1.aspx?id=7.
Without data form web part, the redirect works fine. Kindly help.
Thank you

Resources