Prevent Drag and Drop in React-Music-Player - react-jinke-music-player

Using https://www.npmjs.com/package/react-jinke-music-player / https://github.com/lijinke666/react-music-player
I have an application where the order of the files needs to be strictly enforced.
How can I completely disable the drag-and-drop re-ordering of the files in the playlist via the playlist panel ?
There doesn't seem to be an option to do this.

Related

Lock orientation for custom tabs

I would like to lock the orientation using Chrome Custom Tabs. Is this something I can do with the Low Level API or do I need to get a new method added for this functionality?
My use case is that I have an app that has custom tabs and I want it to always show the custom tab in portrait, never landscape.
Custom Tabs does not currently provide an API that allows the developer to lock the orientation.
As a best practice, developers should always think twice before forcing a specific orientation, as it may be annoying to force the user to use one.
Locking the orientation looks more like something that should be decided by the content being opened inside the Custom Tabs (using an API like this) than something to be handled by the Custom Tab itself.

How do I disable the "Customize Toolbar" from the Quick Access toolbar in Microsoft Access

I have an application I am developing with Access 2010. In certain circumstances I have to limit the users to a very limited subset of the application. This implies a limited Ribbon - by setting a dbProperties to "AllowAllMenus" to false, and changing the File menu (using a Custom Backstage ribbon).
This blocks most off the holes that would allow the user to get back to full menus, and then have access to data I would rather he didn't.
However, there is a hole in this process. The quick access toolbar as a little drop down arrow on the end of it with a hover of "Customise Toolbar". Using it drops down a menu with "More Commands...". Clicking on that drops you into the same dialog box you get when you chose "Options" from the File Menu (disabling of which was the prime purpose of my Backstage Ribbon change).
I can of course do the following in VBA
DoCmd.ShowToolbar "Ribbon",acToolbarNo
but that hides all the menus and Quick Access Toolbar completely. I don't want that, because I still need to allow the user to set up filters and toggle them on an off from the data they do see.
I can't find any other reference to how to block up this security hole in the applcation. Does anyone have any ideas on how?
Assuming that you already have your custom ribbon, make sure that you have assigned: startFromScratch="true".
However, this will disable not only "More Commands..", but all the other options of QAT dropdown list as well, except "Show Below the Ribbon".

Qt - How to force the drop action to be copyaction when the drop location is some other application

I have subclassed QMimeData and drag&drop works perfectly fine within my widget – for both copyAction and MoveAction, Data gets copied and moved as needed (based on shift / ctrl keys etc.)
For compatibility I am supporting other simple formats such as text/plain – the major problem is, I cannot allow ‘move’ operation for the drops to other applications for these compatible formats.
For example, I allow my data to be dropped from my widget to some textbox – but only as long as it is a ‘copyAction’. But, I do not see any way of forcing this.
Question: How to force the drop action to be ‘copy action’ for all external widgets, while allowing the copy/move within my widget?????
By 'force' it is meant no matter what user chooses (ctrl, shift or whatever) - my data should always get 'copied' and not 'moved' when the drag happens for compatible formats. (while it should allow copy and move for its native format)
How to enforce this in Qt?
This appears to be a limitation in Qt.
This post describes the issue and shows that the problem is in QAbstractItemView::startDrag().
Essentially, Qt doesn't directly let you drag both internally to the same widget, and to an external application.

Force system cursor usage in Flex

Let's say that you're using some black box library (i.e. no source code) that sets your cursor to something when rolling over a certain sprite. You can override that by catching rollOver and rollOut events, blocking propagation and using the CursorManager.
Question: is there a way to tell the CursorManager to use the system cursor?
Obviously, I could feed the CursorManager some "system like" cursor, but this would look weird if the local settings are different from that icon, which is likely to be always.
thank you!
f
You can create your own version of CursorManager - just create file mx/managers/CursorManager.as, copy it's content from default manager (use Ctrl+Shift+T to navigate to it) and change the code.
If you use RSLs then you need to create monkey-patch and load it BEFORE RSLs.
if you embed SDK into code then you can simply compile the app and class will be replaced.

How to hide browser's menu?

I am developing an ASP.NET application for an online quiz test. The set of questions would be randomly selected from a pool of questions. The application works fine, but I want to hide the browser menu option (so that user cannot save or print the test) when the quiz page is shown. I do not want to open a new popup window. So how do I do this for the active window.
The application consists of around 5 web pages, and the test is on pages 3 and 4. So I want the menu to be hidden only on pages 3 and 4. Is this possible and how do I do this?
Thanks in advance
This isn't possible. You can only hide the menu bar in a popup window.
Either way, though, the user can always right-click and select Print, or use a shortcut like Ctrl + P. And even if you could hide the menu, they could just disable JavaScript. If they really want to print/save the quiz, you won't stop them. I suggest finding another workaround.
I don't think it is possible to do what you are asking.
And remember that there are other ways to print than using the menu of the browser : Ctrl+P generally does that , it's also possible to "save the page" from the right-click menu or using Ctrl+S -- and, of course, there is always print-screen ;-)
The best "protection" you can probably have is defining a correct license (which means you might need a lawyer, to get something solid), that explicitly forbids re-distribution of questions : this way, your users can re-use the questions for them -- you cannot prevent that, anyway -- but can't re-distribute them.
Of course, this is probably only worth it if you are developping some quizz with questions that you are going to sell.
Once the page is rendered to the screen the ultimate control goes to the user. He can turn off javascript and do the necessary job or he can capture the page and so many ways.
Better not to try doing this.
As long as the data is in the user's computer he may access it in one way or another, and i'm not sure its worth the hassle.
If you want to deny printing, you may try using some special CSS media types (like definning some styles with display:none or color:#fff).
http://www.w3schools.com/CSS/css_mediatypes.asp
But even like this the user might simply press PrntScr :)
You may also intercept ctrl+P keystrokes, by using an onKeyDown event on the whole HTML body and stop the bubling, but it may not work the same cross-browser.
You may also deny right-clicking on the page by handling the onContextMenu event ( http://msdn.microsoft.com/en-us/library/ms536914%28VS.85%29.aspx )
Also, the questions should be rendered as images, or deny selecting text from the page so the user wont be able to copy/paste the questions in an email (http://www.dhtmlcentral.com/forums//archive/index.php/t-18008.html mmight help)

Resources