Use Drupal toolbar without drupal - javascript

I am trying to export js/css files of the drupal admin toolbar to use it somewhere else. is there an easy way of doing this ?
I need these two pieces shown here

I think the easiest way will be to just rebuild from scratch using that image as a template.
They may be some code snippets you can borrow, but most of the code will be too specific to Drupal to be easily reused.

Related

copy template of one html file to others without typing the same code again

i am creating a e-commerce website using html/css. what i am trying to achieve is that i need same template for all product pages after clicking on the product. And i want to do this without actually coding every page using html and css. is there anyway to do this?
i tried to code all pages but that will be impossible to finsh if i keep on doing it, i want an effective way of doing this.
You can use plain JS to achieve the same or can use JS libraries like React JS, Angular JS, etc. for versatility. But all of these would require a good knowledge of coding.
And, to skip coding, I'll suggest you use WordPress + WooCommerce, all the required features are free and you don't have to code a single line, it's all GUI.
You need to add Javascript for this. The easy thing will be to work with a Javascript library called React.
In react you will make a component called a product card! and now you can pass your data to the product card by mapping the product list. You don't need to write product data showing HTML CSS for every product. Just write it one time and use it as many times as you want with React.
Here is the official React documentation

Is there a way to list the settings for an existing JQuery UI .js file?

I am working on a project that has been going for many years. We currently use jquery 1.7.2 and a custom jqueryUI 1.8.21. I am creating a new feature that requires we upgrade jquery, so I am in the process of upgrading to jquery 1.9.1.
The problem is that 1.9.1 isn't compatible with UI 1.8.21, so I need to upgrade UI too. Alright, not a big deal... except that we have a bunch of custom settings in that UI 1.8.21 file, and I need to carry them forward to the new version.
I could recreate the custom theme from scratch using the new UI 1.12.1 version, but it would be very hard and there is always the chance that I will miss some important setting. I am looking for a way to list out the modified settings in the existing file to easily apply them to a customization of the newer version, or to somehow upgrade or recreate the same setting with the newer version.
Is there a tool or automatic way to do this, or am I out of luck and need to just recreate it by hand?
When you download a theme created with ThemeRoller, one of the files is jquery-ui.theme.css. The comment at the beginning has a line like this:
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=custom-theme&bgImgOpacityError=&bgImgOpacityHighlight=&bgImgOpacityActive=&bgImgOpacityHover=&bgImgOpacityDefault=&bgImgOpacityContent=50&bgImgOpacityHeader=&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=%23666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=%23aaaaaa&iconColorError=%23cc0000&fcError=%235f3f3f&borderColorError=%23f1a899&bgTextureError=flat&bgColorError=%23fddfdf&iconColorHighlight=%23777620&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgTextureHighlight=flat&bgColorHighlight=%23fffa90&iconColorActive=%23ffffff&fcActive=%23ffffff&borderColorActive=%23003eff&bgTextureActive=flat&bgColorActive=%23007fff&iconColorHover=%23555555&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgTextureHover=flat&bgColorHover=%23ededed&iconColorDefault=%23777777&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgTextureDefault=flat&bgColorDefault=%23f6f6f6&iconColorContent=%23444444&fcContent=%23333333&borderColorContent=%23dddddd&bgTextureContent=flat&bgColorContent=%23ffffff&iconColorHeader=%23444444&fcHeader=%23333333&borderColorHeader=%23dddddd&bgTextureHeader=flat&bgColorHeader=%23e9e9e9&cornerRadius=10px&fwDefault=normal&fsDefault=1em&ffDefault=Arial%2CHelvetica%2Csans-serif
Follow that link, click the Download Theme button, and you'll be able to download a new version with the same theme.
However, this only specifies the theme. The download page that the button goes to requires you to select the components to include. I don't see any automated way to do that, but there's a comment at the beginning of jquery-ui.js with a line like:
* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
You may be able to figure out which components to select from this.

Get only (or compile only) Bootstrap Grid

I'm trying to incorporate Twitter Boostrap into a project, but only the fluid grid system.
Ideally, I'd be able to pull this from bower and install it that way. Otherwise, I'd like to be able to compile it directly inside of bootstrap's less. I'm basically trying to avoid downloading the file and removing the parts I don't need.
Has anyone had experience with this? Right now, I'm running the following command inside bootstrap:
grunt dist-css
Which is giving me all of the compiled. Is it possible to isolate the grid?
You can go with this link and choose only those components which you need or you can open bootstrap's css file and delete everything besides class container,container-fluid,row,row-fluid and classes that start with name col.
Hope this is useful for you.
http://getbootstrap.com/customize/

How can I customize the Isotope for Wordpress plugin?

I recently added Metafizzy's Isotope to my wordpress page, but I had some trouble linking it to my posts. As a solution I removed the code I had put in manually, and installed this Isotope for Wordpress plugin.
Has anyone used this and customized it using Isotope's different methods and layout modes? I'm having some trouble locating those key pieces of code (that are so easy to edit when you add isotope manually). This plugin seems to make editing them a bit trickier. If anyone could point me in the right direction I'd really appreciate it.
Thanks!
The isotope is function is called in the includes>js folder in the file called load_isotope.js
You can see the layout mode on line 6. Probably adding that functionality to the plugin would be a good idea.

Best way to create custom html joomla link

I'm new to Joomla , just want to understanding the best way to implement this.
http://jsfiddle.net/PSYCKIC/JyKJf/
The IDEA is to use that as a link , i click there and lead me to a article or link. (didn't include the javascript in the example)
PROBLEMS :
-I was doing as a custom HTML, but the problem probably have to use javascript for the link but when i save it save without javascript (and probably it a little hardcoded)
- doesnt work for div
LOOKING the best way:
1) Have some ideas , one was to create a module, or something where i just put the image , link of the article and then is always automatically ( but not sure how to import javascript/jquery trough modules ANY HELP? Someone can help me building?)
2) any good module already created for this?
3) Tutorial than can help me understand?
Like a solution where i have possibility to reuse the code not hardcoded.
Thanks in advance.
There are some Joomla extentions which allow to insert into joomla site any code
http://extensions.joomla.org/extensions/edition/custom-code-in-modules/8651
http://extensions.joomla.org/extensions/edition/custom-code-in-modules/2861
If you want to include such code into article, you have to publish module in any position and then use this shotrcode {loadposition _any_position_}.
I hope it will be helpfull
Which Joomla Version are you using?
You have to disable the built in filtering of joomla and your editor:
http://www.tutorials2learn.com/2010/02/cms/fix-tinymce-editor-strips-flash-embed-code-joomla/
for your eitor, go to plugins -> editor -> options -> filter onload ...
you dont need an extra extension for just a simple javascript link

Categories