how can i change Go to text in Quick Jumper antd pagination - css

I tried changing go to text in ant design pagination.
document says use showQuickJumper={{ goButton: "Your text" }} but result is:
antd pagination go to text
as you see "go to" text is still visible.
how to hide it?

The showQuickJumper parameter affects the display of the quick jump block.
If a component is passed as a goButton value, then it will be displayed as a confirmation button.
In order to achieve the desired behavior and change the "Go to" text to another, you need to pass the locale parameter and override the jump_to property.
<Pagination
showQuickJumper={{
goButton: <button>Your custom button to confirm</button>
}}
total={500}
locale={{ jump_to: "Your text" }}
/>
Unfortunately there is no indication about this anywhere in the documentation. It is relevant for antd version 4.17.0 and earlier

You can use locale
<Pagination
locale={{ jump_to: "Your text", page: 'Your page' }}
/>

Related

Change Color Using Metafields

I want to try and change Specific just so I can customize my dawn store more
enter image description here I am not exactly sure where that is
I tried changing product-variant.liquid but to no avail I thought it would change but it didnt I am not sure why I cant get it to work on my shopify store
Follow the below instruction :
Add a metafield to the product variant using the Shopify admin. You
can do this by navigating to the product variant, scrolling down to
the "Metafields" section, and clicking "Add a metafield".
In the "Namespace" field, enter a unique identifier for the
metafield. For example, "my-shop-color".
In the "Key" field, enter a key for the metafield. For example,
"color".
In the "Value" field, enter the color value you want to use. For
example, "#FF0000" for red.
Save the metafield.
In your product-variant.liquid file, you can use the following code
to retrieve the value of the metafield:
{% assign color = variant.metafields.my-shop-color.color %}
You can then use the color variable to set the background color or any other styling for the variant. For example:
<div style="background-color: {{ color }};">
{{ variant.title }}
</div>
I hope this will help you.

Customise hyperlinks in aem/cq

The following link shows RichtextEditor using Links
https://docs.adobe.com/docs/en/cq/5-6-1/wcm/using_rich_text_editor.html#Links
My requirement is I need to customise Hyperlink or I need to customise rich text editor so that I need a button like mailto:
so on clicking that button I can have a text box to enter the email address.
I have found that one needs to customise the extjs of rte pluigins, but not sure what I need to? Any thoughts?
You need to add a "HTML rules" node inside the richtext xtype of your dialog.xml. Add a "Links" node as a child of this & you can configure the allowed protocols:
<text
jcr:primaryType="cq:Widget"
xtype="richtext">
<htmlRules
jcr:primaryType="nt:unstructured">
<links
jcr:primaryType="nt:unstructured"
protocols="[http://,https://,mailto:]"/>
</htmlRules>
</text>

How to show icon with text message Alfresco.util.PopupManager.displayPrompt

i need to show icon on message box. by using following code on alfresco. i can only show tile and content of msg box. please help me to show icon (?,!,...)
Alfresco.util.PopupManager.displayPrompt(
{
title:"test",
text: "warning"
});
Isn't this enough?
In the appearance section in the share config you can add the following.
"Help Text
A field can have help text to aid the user when filling in the form"
This has been quoted from the wiki https://wiki.alfresco.com/wiki/Forms.
There is predefined function icon in Alfresco.util.PopupManager.displayPrompt you can use that to show icon on message box. This icon will display next to text.
See here for more details
i.e.
Alfresco.util.PopupManager.displayPrompt(
{
title:"test",
text: "warning",
icon: "/images/confirmicon.png"
});

Concrete5: How to open TinyMCE in a modal dialog from inside the custom block?

I'd like to open TinyMCE in a modal dialog from inside the custom block I am building. I know how to implement a modal dialog but couldn't figure out a way to integrate TinyMCE inside the dialog.
What I am trying to achieve is when a text is clicked in the block add/edit popup, it should open up a dialog with TinyMCE to edit that clicked text. Anyone done this before?
This is what I am trying to achieve in add/edit forms:
$this->addHeaderItem(Loader::helper('html')->javascript('tiny_mce/tiny_mce.js'));
Loader::element('editor_init');
Loader::element('editor_config');
Loader::element('editor_controls');
<textarea name="field-name" class="text-area-value ccm-input-textarea">Some text here or empty....</textarea>
$bt = BlockType::getByHandle('myblock');
<a class="dialog-launch ccm-block-type-inner"
dialog-on-close="ccm_blockWindowAfterClose()" dialog-append-buttons="true"
dialog-modal="false" dialog-width="500"
dialog-height="500" dialog-title="<?php echo t('Add/Edit Text)?>"
href="<?php echo $th->getBlockTypeToolsURL($bt); ?>/tinymce_dialog.php?text=<?php echo $text-area-value; ?>">
Edit the above text in TinyMCE
</a>
In tinymce_dialog.php in tools folder:
<textarea name="textarea-name"
class="ccm-input-textarea advancedEditor ccm-advanced-editor">
<?php echo $_GET['text']; ?>
</textarea>
<div class="ccm-buttons dialog-buttons">
<a href="javascript:void(0)" onClick="ccm_blockWindowClose();"
class="ccm-button-left btn">Cancel</a>
Ok
</div>
But I am unable to pass the value of textarea into the modal dialog popup. I tried using href in the anchor tag to pass the value of textarea to a script that resides in the tools folder but that does not seem to work either.
Edit: I've also added buttons in tinymce_dialog.php (See the code above). Not sure if it's possible to pass those buttons through <a dialog-on-close="ccm_blockWindowAfterClose()" dialog-append-buttons="true".....> in the form.
Should work the same as anywhere else. First, include this line of code once in your dialog (you only need it once, regardless of how many TinyMCE's you have):
<?php Loader::element('editor_config'); ?>
Then, for each TinyMCE you want, use this:
<?php Loader::element('editor_controls'); ?>
<textarea name="your-field-name" class="ccm-advanced-editor"></textarea>
There's two ways to go about this:
As you describe in your question edits, where you load a tools file. There are a few points here:
URLs aren't great for passing text data, especially the kind of text that'd be edited in tinymce (long and formatted). With that being said, it should work. I don't see why the $_GET wouldnt' work. Make sure that the URL contains the text in the first place (you can see by looking at your developer console).
Better is to pass an ID (tinymce_dialog?id=[ID]). This is assuming that the text is saved in the DB, but it looks like you might be providing them an interface to basically "wysiwyg edit in a modal text that they're not-wyswiwyg editing already". I'm not sure if you've thought through how this will work, though. By default, they'll have to deal with a bunch of HTML tags ?
The alternative is to create the dialog out of an DOM element. Create a div hidden in the form, with CSS display: none;, save the text into it (if already initialized, tinymce has a .update() or something), and then show the hidden div (with Example 3 from http://www.concrete5.org/documentation/how-tos/developers/javascript-jquery-and-concrete5/). When they click (SAVE), you can then (presumably) copy the data out of tinymce and put it back where it needs to go.
Note that in many cases, the tinymce initialize code only runs on page load. I think that's what Loader::element('editor_init') does. And it works by detecting the appropriate textareas (based on class name). So if the page with the editor_init is loaded before the textarea is loaded (such as how it looks now), you'll have to reinit tinymce. That's a vote for #2. In general, I suggest you go that route.

how to put the node:link token in the html a label?

i have installed the views and token module. i add a views field 'Node:Link' and check the 'exclude from display' option for the 'node:link' field and set the field first in the field order,now i want to overrite a views field.
i put this more >> in the rewrite the output of this field text box. but it can't work? [view_node] is the Node:Link token, how to make the more>> link ok? thank you
In the Node:Link field, enter more in Text to display: text box.
No need to put anchor tag just type [view_node] in the rewrite the output of this field text box.
Views has a built in way to make text link to other pages with tokens. I would use that instead of putting the anchor tag in the rewrite section. It's titled, "Output this field as a link"
If you're on Drupal 6 and you just want to link the field to it's node then just check the box "Link this field to it's node"

Resources