redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Popup

Open Zigson opened this issue 12 years ago • 14 comments

Hi,

beside my field I have a help link (list of all codes for font icon showing up). I was thinking to put it in a popup. Is there perhaps some kind of functionality in framework already? :)

Zigson avatar Jan 30 '14 13:01 Zigson

Not yet. I was planning to add a tooltip field since I already have tipsy attached. Where would you want that to appear? If we did it to the left with the title/description it would be pretty simple...

dovy avatar Jan 30 '14 19:01 dovy

I want to help user by giving him the list, like this one:

http://astronautweb.co/snippet/font-awesome/

So he can enter the code for icon, which will then appear at frontend. Popup would be nice but I think I will link him to my site with list, opening in new window.

I was also thinking doing a simple select/option field. But I am not sure if this is possible, having two fonts in select/option. Need to figure it out.

Zigson avatar Jan 30 '14 20:01 Zigson

@dovy .. you can add a argument in framework where user can can pass link of help-file location. And, another new field parameter "help" can be added for partial path in fields. By using both values and current 'thickbox' class, a link can be created same like star '*', for default values, is displaying with field name.

Help URL:

$this->args = array(
'help_url'              => get_template_directory_uri() . '/documentations/'
)

Field Configuration:

array(
    'id'         =>'field_id',
    'type'     => 'text',
    'title'       => __('Field Name', 'redux-framework-demo'),
    'subtitle' => __('', 'redux-framework-demo'),
    'desc'     => __('', 'redux-framework-demo'),
    'help'     => 'field_path',
),

HTML Output

<div class="redux_field_th">
    Field Name
    <div class="redux-field-help">
        <a class="thickbox" href="http://localhost/wp-content/themes/redux-theme/documentations/field_path/?TB_iframe=true&amp;width=640&amp;height=256">?</a>
    </div>
    <span class="description"></span>
</div>

or

'help'    => 'field_path/?xyz=abc',
<div class="redux_field_th">
    Field Name
    <div class="redux-field-help">
        <a class="thickbox" href="http://localhost/wp-content/themes/redux-theme/documentations/field_path/?xyz=abce&amp;TB_iframe=true&amp;width=640&amp;height=256">?</a>
    </div>
    <span class="description"></span>
</div>

cyberwani avatar Jan 31 '14 10:01 cyberwani

Thanks Dinesh, I will try your suggestion.

Zigson avatar Jan 31 '14 17:01 Zigson

@Zigson it's not available yet in framework. It was a suggestion for developers to integrate like this. Sorry for my bad English ;)

cyberwani avatar Feb 01 '14 04:02 cyberwani

Nothing wrong with your english :)

Zigson avatar Feb 01 '14 11:02 Zigson

@Zigson, how about this instead: http://reduxframework.com/extension/icon-select/

I think that will solve all you need. I'm going to close this for now. :P

dovy avatar Feb 03 '14 05:02 dovy

Ha, I have coded this during weekend as well! :)

If I want to purchase it and sell it in my theme, I would need to buy "1 commercial product"?

Zigson avatar Feb 03 '14 08:02 Zigson

Correct. ;)

dovy avatar Feb 03 '14 08:02 dovy

And thanks for coding it, it might come in handy to somebody else :)

Zigson avatar Feb 03 '14 08:02 Zigson

FYI, a bit more handy than you make think. Auto parses a remote or local CSS file with provided selector and auto enqueues the script. ;)

Yea. Sorry you double coded. Heh.

dovy avatar Feb 03 '14 08:02 dovy

Pps, if you come up with a useful field let us know. We may want to add it to the market place. ;)

dovy avatar Feb 03 '14 08:02 dovy

@Dovy, what does that mean? "Auto parses a remote or local CSS file with provided selector"

Here is my solution, I need to style it a bit though:

screen shot 2014-02-03 at 09 50 28

Zigson avatar Feb 03 '14 08:02 Zigson

I did that with:

array(
    'id'=>'icon_chooser_content',
    'type' => 'info',
    'raw_html'=> true,
    'desc' => $icon_chooser_content,
),

including html file with all icons, added some javascript functionality.

Zigson avatar Feb 03 '14 09:02 Zigson