EasyUI Forum
November 04, 2025, 12:03:22 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: feature request - dynamic icon-class folder [Solved] on: February 09, 2015, 08:36:43 PM
Hi, I'm newbie to .js, I'll try the recipe, but it doesn't work for me...

this is my testing code:
Code:
    <title>Test icons</title>
<link rel="stylesheet" type="text/css" href="./js/libs/jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="./js/libs/jquery-easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="./js/libs/jquery-easyui/demo.css">
<script type="text/javascript" src="./js/libs/jquery-easyui/jquery.min.js"></script>
    <script type="text/javascript" src="./js/libs/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="./js/libs/jquery-easyui/autoicons.js"></script>
    </head>
    <body>
    <h2>Test icons</h2>

<!--
         ./js/libs/jquery-easyui/themes/aicons/aiwrap.png
         or
         ./js/libs/jquery-easyui/themes/aicons/aicon-aiwrap.png
         -->
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="aicon-aiwrap" onclick="edit()">Edit</a>
The icon doesn't appear...
I try to leave a trace into autoicons.js like that:
Code:
(function($){
var base = '.';
var dir = 'themes/aicons/';
var cls = {};
println(dir);
        [...]
it doesn't print dir variable...
Sorry if it's a dumb question...

It's ok now...
1. It seems to be a CLEAR CACHE of browser problems
2. I used a wrong track function println(dir); instead of document.writeln(dir+'<br>');
3. The name of image file must be whithout the prefix 'aicon-', just aiwrap.png
4. It works also with .ico extension if you modifiy the line in autoicons.js: var icon = ss[1]+'.ico';

I let this post here, maybe is usefull for another user...
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!