How call different Classes on button in Ui-Component. Magento2

I create the ui_component which code is

<?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">     <argument name="data" xsi:type="array">         <item name="js_config" xsi:type="array">             <item name="provider" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>             <item name="deps" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>         </item>         <item name="label" xsi:type="string" translate="true">Make An Offer</item>          <item name="config" xsi:type="array">             <item name="dataScope" xsi:type="string">data</item>             <item name="namespace" xsi:type="string">makeanoffer_edit</item>         </item>         <item name="template" xsi:type="string">templates/form/collapsible</item>          <item name="buttons" xsi:type="array">             <item name="back" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\BackButton</item>             <!-- <item name="delete" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\DeleteButton</item> -->             <item name="reset" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\ResetButton</item>             <item name="save_and_continue" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\RejectButton</item>             <item name="save" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\AcceptButton</item>             <!-- <item name="accept" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\AcceptButton</item> -->          </item>             </argument>     <dataSource name="makeanoffer_data_source">         <argument name="dataProvider" xsi:type="configurableObject">             <argument name="class" xsi:type="string">PME\MakeAnOffer\Model\MakeAnOffer\DataProvider</argument>             <argument name="name" xsi:type="string">makeanoffer_data_source</argument>             <argument name="primaryFieldName" xsi:type="string">makeanoffer_id</argument>             <argument name="requestFieldName" xsi:type="string">id</argument>              <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>                 </item>             </argument>             <!--  <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>                 </item>             </argument> -->          </argument>         <argument name="data" xsi:type="array">             <item name="js_config" xsi:type="array">                 <item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>             </item>         </argument>     </dataSource>     <fieldset name="general">         <argument name="data" xsi:type="array">             <item name="config" xsi:type="array">                 <item name="label" xsi:type="string"/>             </item>         </argument>         <field name="makeanoffer_id">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="visible" xsi:type="boolean">false</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">makeanoffer</item>                 </item>             </argument>         </field>         <field name="product_name">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="label" xsi:type="string">Product Name:</item>                     <item name="visible" xsi:type="boolean">true</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="disabled" xsi:type="boolean">true</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">makeanoffer</item>                 </item>             </argument>         </field>         <field name="name">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="label" xsi:type="string">Customer Name:</item>                       <item name="visible" xsi:type="boolean">true</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="disabled" xsi:type="boolean">true</item>                     <item name="source" xsi:type="string">makeanoffer</item>                     <item name="validation" xsi:type="array">                         <item name="required-entry" xsi:type="boolean">false</item>                     </item>                 </item>             </argument>         </field>         <field name="email">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="label" xsi:type="string">Customer Email:</item>                     <item name="visible" xsi:type="boolean">true</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="disabled" xsi:type="boolean">true</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">makeanoffer</item>                 </item>             </argument>         </field>         <field name="pnumber">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="label" xsi:type="string">Customer PhoneNo:</item>                     <item name="visible" xsi:type="boolean">true</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="disabled" xsi:type="boolean">true</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">makeanoffer</item>                 </item>             </argument>         </field>         <field name="offer_time">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="label" xsi:type="string">Offerd at time:</item>                     <item name="visible" xsi:type="boolean">true</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="disabled" xsi:type="boolean">true</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">makeanoffer</item>                 </item>             </argument>         </field>          <field name="message">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="label" xsi:type="string">Customer Message:</item>                     <item name="visible" xsi:type="boolean">true</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="disabled" xsi:type="boolean">true</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">makeanoffer</item>                 </item>             </argument>         </field>         <field name="product_price">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="label" xsi:type="string">Product Price:</item>                     <item name="visible" xsi:type="boolean">true</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="disabled" xsi:type="boolean">true</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">makeanoffer</item>                 </item>             </argument>         </field>         <field name="offeramount">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="label" xsi:type="string">Offerd Price:</item>                     <item name="visible" xsi:type="boolean">true</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="disabled" xsi:type="boolean">true</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">makeanoffer</item>                 </item>             </argument>         </field>              </fieldset>  </form> 

now my question is I created two buttons first is Accept Offer and other is Reject Offer I want to call different classes on the each class but they both call the same class because of the submit_url now how can I set these two buttons to call the different classes and my Second Question is if I change the name of the Accept Button from save to somthing else then it do not call my class the same issue is withe Reject Button as well if I change the name from “save_and_continue” to something else it do not works.

enter image description here

Is there a way enforce use of a custom content type for drag&drop and for File/New Folder button?

I created a custom content type called PIN Folder. The content type has 3 attributes – title (required), ms (optional), and comment (optional). In my library I created a default view for PIN Folders which use this content type. As desired, now when I add folders through the File/New Document/PIN Folder button, a folder is created with the PIN Folder attributes.

The problem is that when I drag/drop folders via the Explorer view, or add a folder using the File/New Folder button, the only attribute applied is title. Based on this, my assumption is that drag/drop and New Folder use the standard folder content type rather than my custom content type.

There are going to be numerous picture libraries with hundreds of PIN folders in each library, so drag/drop is the best method for initial creation for the library content.

Is there a way without code to enforce use of my folder custom content type when dragging/dropping or using New Folder? (I do have SP Designer.)

Note: I considered creating a subsite and changing the default folder content type for that subsite. Would that be viable?

Custom button or bookmarklet to toggle Conversation View On/Off

I’m trying to write a script that will add a button (or even use a bookmarklet) to toggle Conversation View on and off.

This works, some of the time, to do the toggling:

window.location.href = "https://mail.google.com"+window.location.pathname+"#settings/general"; setTimeout(function() {     convTogs = document.getElementsByName("bx_vmb");         if (convTogs[0].checked) convTogs[1].click();          else convTogs[0].click();         document.querySelector("[guidedhelpid=save_changes_button]").click(); }, 5000); 

This adds the button where I want it:

var btn = document.createElement("div"); btn.id = "cvtoggle"; btn.classList.add("G-Ni","J-J5-Ji"); btn.innerHTML = "ConversationView"; btn.setAttribute("onclick", _____code____); document.getElementsByClassName("Cr aqJ")[0].prepend(btn) 

but whatever ___code___ I use, I get an error in console:

Refused to execute inline event handler because it violates the following Content Security Policy directive: “script-src ‘report-sample’ ‘nonce-30MWHJuxRebUkp5KrawUmw’ ‘unsafe-inline’ ‘strict-dynamic’ https: http: ‘unsafe-eval'”. Note that ‘unsafe-inline’ is ignored if either a hash or nonce value is present in the source list.

Also, the method of going to Settings is poor; it causes a full refresh.

The selector for the “Setting” link in the gear menu is document.querySelector('#ms > div') but I can’t figure out how to “click” it.

Enabling a button via EditText

I’m trying to enable a button to become clickable once a key on the emulator keyboard is pressed and then disabled if the field is empty. How would one implement this? This is my code thus far:

class MainActivity : AppCompatActivity() {          override fun onCreate(savedInstanceState: Bundle?) {             super.onCreate(savedInstanceState)             setContentView(R.layout.activity_main)              val button = findViewById<Button>(R.id.log_in_button)             val email = findViewById<EditText>(R.id.email_field)              button.isClickable = false             button.alpha = .5f              email.setOnKeyListener(object : View.OnKeyListener {                 override fun onKey(v: View, keyCode: Int, event: KeyEvent): Boolean {                      if(event.action == KeyEvent.ACTION_DOWN) {                          button.isClickable = true                         button.alpha = 1f                         return true                     }                      return false                 }             }) }