In Sencha Touch, exactly how do I change the icon in the Tab Panel to one of the existing picto icons included in Sencha Touch? - extjs

I have researched this issue thoroughly throughout Stackoverflow and have yet to find a precise answer, so here is my question.
I am using Sencha Touch 2.4. I am using its default theme, that is, the theme that you see when you first download Sencha Touch and get set up to develop in it for the first time. I am that new to Sencha.
In Sencha I am making a Tab Panel, and in the Tab Panel, I am trying to include in the tab bar one of the many nice little picto icons included in the development kit that is not included in the default theme, using the lines of code:
title: 'Transfer',
iconCls: 'photo2',
html: 'Text stuff'
In addition, all of the guidance I have read tells me to go into the appropriate .scss file for this theme and add a single line of code, like so:
#include pictos-iconmask(‘photo2’);
Obviously it seems that this line of code should be placed in Panel.scss in the tab directory in the default theme folder, but this does not work. Now I have no idea which .scss file it should be. I have since gone into every .scss file in my SDK labeled something related to my theme, such as "tab", "Panel", "all", "app", etc., and added this line of code, but the icon will not show up. I am obviously missing something. Someone please tell me, assuming the default theme, exactly which file and in which directory and on what line of code in that file do I place this piece of code known as
#include pictos-iconmask(‘photo2’);
Thank you for any help you can give.

In Sencha Touch 2.4, just include the icon (as opposed to pictos-iconmask). For example:
#include icon('photo2');
I would recommend doing this in a high level file, not a scoped file such as tab.Panel.scss. You can always narrow down your SCSS scope later on, however for debugging just toss the include into your base app.scss to ensure it works first.

You can use the following css code to accomplish your task:
.x-tab .x-button-icon.photo2:before, .x-button .x-button-icon.photo2:before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
text-align: center;
font-family: "Pictos";
content: "N"; //mention your pictos character here like i have mentioned N here
}

Related

Codename One: use Fontello with CSS

Note for the readers: this question is not about standard CSS, but it's related exclusively to the CSS support of Codename One.
I'm not satisfied of the Material Font Icons included in Codename One.
I want to replace almost all these lines:
FontImage.createMaterial(FontImage.MATERIAL_XXX, "ColorWhite", 4)
with something different taken from Fontello.
In the past I read how to do that using the CSS support included in Codename One, but at the moment I'm not finding what I read. I only found this: https://www.codenameone.com/blog/using-icon-fonts-such-as-fontello.html, but it doesn't explain how to use the CSS.
So my question is the correct coding to use Fontello icons inside a Codename One app using CSS (is there any tutorial?).
You can just declare the font as explained here https://github.com/shannah/cn1-css/wiki/Fonts
Roughly something like this:
#font-face {
font-family: "Fontello";
src: url(res/Fontello.ttf);
}
Then you can apply the font to any UIID you wish to use such as:
MyIcon {
font-family: "Fontello";
}

How to customize allure report title and logo

Below attached allure report image that generated via allure. Would like to customize report title and logo (image highlighted yellow) with my own title and logo instead of ALLURE REPORT and default logo. Appreciate your help.
To change the logo you should put the custom-logo-puglin into the puglins folder:
Edit the styles.css file and change the image reference to your own file.
In the jenkins to customize each project the plugins folder is placed here:
If you would like change for all the projects the folder is:
I recommend you the user manual
Title Change
I have changed the title by cloning the repository from git and built a local copy. (I am using Windows OS).
Prerequisite
Gradle Version 5.2.1-https://gradle.org/releases/
Node Js-https://nodejs.org/en/download/ -npm -6.4.1
After installing prerequisite please follow below steps
Visit https://github.com/allure-framework/allure2
Clone the repository- Link:
https://github.com/allure-framework/allure2.git
Assume the repository is saved locally under C:\allure2-2.10.0
Navigate to
C:\allure2-2.10.0\allure-generator\src\main\java\io\qameta\allure\summary
Edit SummaryPlugin.Java file with any text editor
Search for setReportName("Allure Report"); and change to whatever name
you want to give. Example setReportName("Automation Report")and save that file
Navigate to C:\allure2-2.10.0\allure-generator
Open command prompt (cmd) from this folder.Type gradle build and hit enter
Wait for few mins till it builds. It takes around 20 mins.
Navigate to c:\allure2-2.10.0\allure-generator\build\libs
Copy newly created file in build\libs folder allure-generator-2.10.0.jar file
I have installed manually from https://docs.qameta.io/allure/#_manual_installation
Navigate to allure-2.10.0\allure-2.10.0\lib and override allure-generator-2.10.0.jar file with the file created newly from the gradle build folder
Title change image screenshot
Logo Change
I have installed manually from
https://docs.qameta.io/allure/#_manual_installation
Navigate to folder allure-2.10.0\allure-2.10.0\config
With any text editor edit file named allure.yml
At the last add one more line i.e. enter code here
- custom-logo-plugin and save the file to activate the plugin. allure.yml screenshot
Navigate to allure-2.10.0\plugins\custom-logo-plugin\static edit
styles.css
.side-nav__brand {
background: url('yourlogo.svg') no-repeat left center !important;
padding-left: 180px !important;
margin-left: 10px;
}
In the same folder put your svg file or png image file
Now generate allure report.
Both title and logo will be changed according to your needs.
Hope it helps! Thanks
In the custom-logo-plugin/static/styles.css add "!important" to the background style. With that change the custom-logo-plugin should work. This replaces only the logo image.
You can also use a logo-with-text by using "display:none" to .side-nav__brand-text selector and adding a height to .side-nav__brand selector. Your logo in this case should be 170px width.
allure custom logo and report name / title plugin(s) are currently not working due to previous changes, you can achieve this goal by cloning the source, modifying it and building a local copy instead and using it until we fix such plugins or offer a new alternative.
I may answer a little late...
Concerning the report title, actually it seems to be hardcoded during the generation step.
Take a look at the files in "allure-generator/src/main/java/io/qameta/allure/summary",
especially SummaryPlugin.java
SummaryPlugin.java
A short term solution could consist in editing the file "allure-report/widgets/summary.json" between "allure generate" and "allure open".
summary.json
The long term one should be to add a parameter during the generation step.

ExtJS Admin Dashboard Example from the docs

I am trying to understand how things connect in the Admin Dashboard example, the register page here: http://examples.sencha.com/extjs/6.5.0/examples/admin-dashboard/?classic#register
FYI, I have read the entire docs on the quick start and the guide (which includes almost everything), and yet I find few things that I cannot connect. Maybe the docs need improvement or maybe I'm just dumb. I'll find out if its the latter.
This is the entire source code for the application: https://github.com/bjornharrtell/extjs/tree/master/templates/admin-dashboard. I am working with the classic version.
Now for the register page, the main view is this: https://github.com/bjornharrtell/extjs/blob/master/templates/admin-dashboard/classic/src/view/authentication/Register.js
My questions are:
At line 25: cls: 'auth-dialog-register'. Which means an extra css class is being added to the component. Now I searched the scss files and did not find the style definitions for this class anywhere. Since this component is the 'authdialog', I looked at this file in particular: https://github.com/bjornharrtell/extjs/blob/master/templates/admin-dashboard/classic/sass/src/view/authentication/Dialog.scss, but I cannot find 'auth-dialog-register' anywhere. Where is that class defined? Or is it not being used(in that case, bummer)
Similarly at lines: Line 42, Line 57 also, there is a class 'auth-textbox' being attached to text boxes, but I cannot find where its styles are defined.
Moving on, on line 49, for the textfield, a 'triggers' config is defined. In the docs it is here: http://docs.sencha.com/extjs/6.5.1/classic/Ext.form.field.Text.html#cfg-triggers , It really doesn't explain anything, just a bunch of code. Also on the next line in the Register.js file, on line 50, it has a 'glyphed' config inside triggers. Again, I cannot find out in the docs what it is used for. Sure the idea is clear, that it is used for a textbox trigger, but I need to be sure I know what is happening.
My next question is probably connected with the previous one. If you look at the example page: http://examples.sencha.com/extjs/6.5.0/examples/admin-dashboard/?classic#register, you see that all text boxes have an icon saying what the field is for: Email field has an email icon. How did that come? I'm pretty sure it had to do with the triggers config in my previous question. According to the documentation https://docs.sencha.com/extjs/6.0.2/guides/core_concepts/font_ext.html, I should use a 'iconCls' config, but here that is not used.
Please someone explain this. Is it reasonable to have these questions? Or should I have been able to figure them out? I am new to ExtJS and have just started learning it from 2 weeks.
1/2) Seems they are unused classes. I'll open a ticket to remove them.
3) The triggers are button like things that can be appended to the field. As it says in the docs, they are a set of configurations for Ext.form.trigger.Trigger, the options for those can be found here: http://docs.sencha.com/extjs/6.5.1/classic/Ext.form.trigger.Trigger.html
glyphed is not a config, but rather a "label" for that trigger in the field.
4) That is some custom css, applied by the classes used in the trigger.
.password-trigger,
.auth-email-trigger,
.auth-password-trigger,
.auth-envelope-trigger {
&:before{
top: 10px;
left: -18px;
position: relative;
color: $dialog-trigger-color;
font-size: 30px;
}
&.password-trigger:before,
&.auth-password-trigger:before {
content: "\f023";
}
&.auth-email-trigger:before {
content: "\f007";
}
&.auth-envelope-trigger:before {
content: "\f0e0";
}
}

R Studio: Change cursor color

I use the Cobalt editor theme in R Studio which I have slightly adjusted by changing the respective .cache.css file. The background color is dark (my choice) but the text cursor (mouse pointer) is dark as well so it is hard to see.
Where or how can I change the the mouse pointer color to e.g. green in the .cache.css file?
Using this issue on another tool, I added these lines to my cache.css file:
.ace_editor *, input.GNKRCKGCKS { cursor: -webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=') 1x, url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC') 2x) 5 8, text; }
I could not find way to edit cache.css but following from Devin's reply and rstudio forum worked on my end.
cd <path_to_rstudio_server>/www/rstudio/
nano 1C0010BF6F4789B46E4091CEC24E6DAD.cache.css
where 1C0010BF6F4789B46E4091CEC24E6DAD.cache.css matched current Material theme I am using for rstudio. To view css file for your rstudio theme, right-click anywhere in the upper code panel in rstudio browser window and select Inspect (Element) option for Chrome (Firefox). Under Styles section on right panel, you should see file name ~ alphanumberic_characters.cache.css.
Add cursor css from Devin's reply under .ace_string.ace_regexp:
.ace_cursor,
.ace_string.ace_regexp {
color: #D30102
-webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=') 1x, url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC') 2x) 5 8, text;
}
Save, exit and restart rstudio-server to take edits into effect.
Windows Solution
You can edit specific themes by going to 'C://Program Files/RStudio/resources/themes/your_theme_of_chocie'
Open the file, for example cobalt.rstheme with something like VS code
Paste the line as supplied by #Devin from above answer.
Save the file and re-open RStudio. While this is a .rstheme file, it is written in CSS.

Can't make Stylish script site specific

I have a Stylish script on Firefox that moves the Search button on Starting Page, but the problem is that it will move the Search button on other pages, as well.
The lines
#-moz-document url("http://startingpage.com/eng/advanced-search.html?&cat=web&query=")
OR
#-moz-document domain("http://startingpage.com/eng/advanced-search.html?&cat=web&query=")
do not work. The Search button will move on any page that has it.
Any ideas to make it site-specific?
Here’s the script:
#-moz-document url("http://startingpage.com/eng/advanced-search.html?&cat=web&query="){
}
input[value="Search"] /*isolates button*/
{
position: absolute;
top: 311px;
left: 660px;
}
Firefox 3.6.14, Win 2K
General answer:
That first line (#-moz-document url("http://startingpage.com/eng/advanced-search.html?&cat=web&query=")) should work. Does it only fail because other pages are also affected or does it fail because it never fires?
Anyway, things to check:
Was the opening brace omitted? Usually those lines are like:
#-moz-document url("http://www.google.com/hl=en&q=foo&aq=f") {
Note the brace at the end (But editing for the brace on the next line is fine, too.
Are the next pages, after the Starting Page, being loaded in by AJAX? For example, Google does this. You will notice that after entering a search term, the entire page does NOT reload.
If this is the case, then Stylish will still have the overwritten styles in effect; there is no help for it in Stylish.
So, confirm the problem with your first line. It would also be good to include exact links to the target pages and the full script.
If it is an AJAX issue, then you can easily convert the Stylish script to a Greasemonkey script -- which can, with a little logic, apply styles correctly, even on Ajaxified pages. (If that is the case: mark this question answered and open a new question, providing the full Stylish script and the desired results.)
Specific Answer, based on new information from the OP:
Based on the script provided, the error is that the braces are mispositioned. Also, you should provide a namespace.
So replace the script text with:
#namespace url(http://www.w3.org/1999/xhtml);
#-moz-document url("http://startingpage.com/eng/advanced-search.html?&cat=web&query=")
{
input[value="Search"] /*isolates button*/
{
position: absolute;
top: 311px;
left: 660px;
}
}
#-moz-document url-prefix("http://startingpage.com/eng")
or
#-moz-document domain(startingpage.com)

Resources