Yii Framework Forum: [EXTENSION] Bootstrap - Yii Framework Forum

Jump to content

  • (45 Pages)
  • +
  • « First
  • 36
  • 37
  • 38
  • 39
  • 40
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] Bootstrap Bringing together Yii and Twitter Bootstrap Rate Topic: ***** 23 Votes

#741 User is offline   akimoff 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 20-September 12

Posted 08 October 2012 - 08:57 AM

how do that bootstrap.min.js and bootstrap.min.css will be loaded at start? I set defined('YII_DEBUG') or define('YII_DEBUG',false); but nothing happens
0

#742 User is offline   akimoff 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 20-September 12

Posted 09 October 2012 - 06:20 PM

Ellow again!
I just downloaded latest version yii-bootstrap-1.1.0.r298.zip from http://www.yiiframew...sion/bootstrap/ . And in the file components/Bootstrap.php to write "* @ version 1.0.0", and found getVersion() function that returns "1.0.0". But it would be "1.1.0"!
Also regardless of the update parameters $this->coreCss and $this->responsiveCss do not connect "min"-like files.
Amazing! Agree, is not it?
0

#743 User is offline   Pavan Kumar 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 28-January 11

Posted 11 October 2012 - 08:22 AM

Hi Chris,

After configuring extension when i try to use split button the alignment of split button is not proper. I have copied exactly the source code for split button from demo page and tried to use. I have attached screen shot for the issue. Not sure if any css is missing.

Thanks in advance,
Pavan

Attached File(s)


0

#744 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,197
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 11 October 2012 - 07:25 PM

Number of icons that you can use with Bootstrap elements is really impressive (140!). I don't know, if Chris has given anywhere a complete list of them, so I prepared my own and want to share it:

adjust, align-center, align-justify, align-left, align-right, arrow-down, arrow-left, arrow-right, arrow-up, asterisk, backward, ban-circle, barcode, bell, bold, book, bookmark, briefcase, bullhorn, calendar, camera, certificate, check, chevron-down, chevron-left, chevron-right, chevron-up, circle-arrow-down, circle-arrow-left, circle-arrow-right, circle-arrow-up, cog, comment, download, download-alt, edit, eject, envelope, exclamation-sign, eye-close, eye-open, facetime-video, fast-backward, fast-forward, file, film, filter, fire, flag, folder-close, folder-open, font, forward, fullscreen, gift, glass, globe, hand-down, hand-left, hand-right, hand-up, hdd, headphones, heart, home, inbox, indent-left, indent-right, info-sign, italic, leaf, list, list-alt, lock, magnet, map-marker, minus, minus-sign, move, music, off, ok, ok-circle, ok-sign, pause, pencil, picture, plane, play, play-circle, plus, plus-sign, print, qrcode, question-sign, random, refresh, remove, remove-circle, remove-sign, repeat, resize-full, resize-horizontal, resize-small, resize-vertical, retweet, road, screenshot, search, share, share-alt, shopping-cart, signal, star, star-empty, step-backward, step-forward, stop, tag, tags, tasks, text-height, text-width, th, th-large, th-list, thumbs-down, thumbs-up, time, tint, trash, upload, user, volume-down, volume-off, volume-up, warning-sign, wrench, zoom-in, zoom-out

Hope, this will be usefull to someone.
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#745 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 117
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 11 October 2012 - 09:26 PM

View PostTrejder, on 11 October 2012 - 07:25 PM, said:

Number of icons that you can use with Bootstrap elements is really impressive (140!). I don't know, if Chris has given anywhere a complete list of them, so I prepared my own and want to share it:

adjust, align-center, align-justify, align-left, align-right, arrow-down, arrow-left, arrow-right, arrow-up, asterisk, backward, ban-circle, barcode, bell, bold, book, bookmark, briefcase, bullhorn, calendar, camera, certificate, check, chevron-down, chevron-left, chevron-right, chevron-up, circle-arrow-down, circle-arrow-left, circle-arrow-right, circle-arrow-up, cog, comment, download, download-alt, edit, eject, envelope, exclamation-sign, eye-close, eye-open, facetime-video, fast-backward, fast-forward, file, film, filter, fire, flag, folder-close, folder-open, font, forward, fullscreen, gift, glass, globe, hand-down, hand-left, hand-right, hand-up, hdd, headphones, heart, home, inbox, indent-left, indent-right, info-sign, italic, leaf, list, list-alt, lock, magnet, map-marker, minus, minus-sign, move, music, off, ok, ok-circle, ok-sign, pause, pencil, picture, plane, play, play-circle, plus, plus-sign, print, qrcode, question-sign, random, refresh, remove, remove-circle, remove-sign, repeat, resize-full, resize-horizontal, resize-small, resize-vertical, retweet, road, screenshot, search, share, share-alt, shopping-cart, signal, star, star-empty, step-backward, step-forward, stop, tag, tags, tasks, text-height, text-width, th, th-large, th-list, thumbs-down, thumbs-up, time, tint, trash, upload, user, volume-down, volume-off, volume-up, warning-sign, wrench, zoom-in, zoom-out

Hope, this will be usefull to someone.


Nice list in alphabetical order. Thanks, Trejder.

Of course one need to prepend "icon-" to make it work.

Last not least here's an overview of all 140 icon glyphs in action; in no particular order.
1

#746 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,197
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 12 October 2012 - 05:50 AM

View PostDon Felipe, on 11 October 2012 - 09:26 PM, said:

Last not least here's an overview of all 140 icon glyphs in action; in no particular order.

Thanks! I was looking for something like this, but unfortunatelly it was midnight, and my eyes were blind, so I haven't found it! :]
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#747 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,197
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 12 October 2012 - 05:52 AM

Got another question.

What is the easiest way (if any?) to overwrite Bootstrap Extension styles, without directly editing them in assets folder of that extension?

It publish styles dynamically, so they overwrite anything I have declared statically in CSS files binded to main.php.

Any workaround for this?

Thanks!
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#748 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 117
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 12 October 2012 - 06:15 AM

View PostTrejder, on 12 October 2012 - 05:52 AM, said:

Got another question.

What is the easiest way (if any?) to overwrite Bootstrap Extension styles, without directly editing them in assets folder of that extension?

It publish styles dynamically, so they overwrite anything I have declared statically in CSS files binded to main.php.

Any workaround for this?

Thanks!


Instead of putting your CSS inside <head> register them at the bottom of your layout file and they will dynamically be added after bootstrap's stylesheet. That would be the quick workaround.

The more time consuming solution would be generating your very own bootstrap.css with less. You can use the original php script or the less extension of chris83. At first, less doesn't seem so easy not to say less work but once you're getting the hang of it, you will know why it's called less. Managing stylesheet will become less stressful.
1

#749 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,197
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 12 October 2012 - 02:47 PM

Don Felipe,

View PostDon Felipe, on 12 October 2012 - 06:15 AM, said:

Instead of putting your CSS inside <head> register them at the bottom of your layout file and they will dynamically be added after bootstrap's stylesheet. That would be the quick workaround.

If I'm getting you correct, that would mean moving my private CSS file from css folder to somewhere inside protected and publishig it to assets with registerCssFile function, right?

View PostDon Felipe, on 12 October 2012 - 06:15 AM, said:

The more time consuming solution would be generating your very own bootstrap.css with less. You can use the original php script or the less extension of chris83. At first, less doesn't seem so easy not to say less work but once you're getting the hang of it, you will know why it's called less. Managing stylesheet will become less stressful.

I've heard about LESS and its power and I'm willing to learn it. But right now I've got no time for that.

Another thing, to not post another post in the same thread.

I'm using TbNavbar along with multilevel TbMenu. To open first level, you have to click on any button on navbar, that has a menu attached to it. But once this menu is open, you have to actually hover any item to see it's subitems. Since that menu has url set to #, clicking it closes menu and do nothing.

How can I change it, so to open any level of my submenu would require clicking parent item, not hovering it? Right now this construction fails completely on mobile devices, that does not support hovering at all (at least my Nexus) and only converts tapping to clicking.
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#750 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 117
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 12 October 2012 - 08:54 PM

View PostTrejder, on 12 October 2012 - 02:47 PM, said:

Don Felipe,

If I'm getting you correct, that would mean moving my private CSS file from css folder to somewhere inside protected and publishig it to assets with registerCssFile function, right?


No, no need of moving it. Just leave your css file where it is and simply register it.

Yii::app()->getClientScript()->registerCssFile(Yii::app()->baseUrl.'/css/styles.css');


registerCssFile doesn't do anything else than adding the css file in <head> just like you would do manually. The only difference - when putting this at the bottom of your layout file - is, it will add and append your css file behind other css files that have already been added before (from other components and extensions like bootstrap).

Just try it.
1

#751 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 117
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 12 October 2012 - 10:02 PM

View PostTrejder, on 12 October 2012 - 02:47 PM, said:

I'm using TbNavbar along with multilevel TbMenu. To open first level, you have to click on any button on navbar, that has a menu attached to it. But once this menu is open, you have to actually hover any item to see it's subitems. Since that menu has url set to #, clicking it closes menu and do nothing.

How can I change it, so to open any level of my submenu would require clicking parent item, not hovering it? Right now this construction fails completely on mobile devices, that does not support hovering at all (at least my Nexus) and only converts tapping to clicking.


Unfortunately there is no option to define how to open a submenu (click vs hover) no matter what level.
Not sure if you can achieve this by just adding css classes through "itemOptions" and "linkOptions"?
1

#752 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,197
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 13 October 2012 - 07:53 AM

Don Felipe, your a true help here! Thank you so much! :] Let me answer in points, because this is getting to long...

View PostDon Felipe, on 12 October 2012 - 08:54 PM, said:

registerCssFile doesn't do anything else than adding the css file in <head> just like you would do manually. The only difference - when putting this at the bottom of your layout file - is, it will add and append your css file behind other css files that have already been added before (from other components and extensions like bootstrap).

Works like a charm! Thank you and trully deserved +1! :]

View PostDon Felipe, on 12 October 2012 - 10:02 PM, said:

Unfortunately there is no option to define how to open a submenu (click vs hover) no matter what level. Not sure if you can achieve this by just adding css classes through "itemOptions" and "linkOptions"?

Thats pretty pitty. I don't seems to be beliving that they have missed such obvious thing like submenus on mobile devices. Anyway, I posted a question on Google Groups Twitter Bootstrap forum and we'll see, if I get any reply there.

New thing. Is there any way I can force navbar to not make brand a clickable link? It is quite easy using pure Bootstrap, but I don't see any way to achieve it in Chris' extension. Even setting brandUrl to empty string or false doesn't stopped navbar from adding brand with link. Of course, I'm asking about any outter methods, like modyfing htmlOptions etc. Changing extension itself to don't add link and only display text, when brandUrl is empty or false, would took five mintues or so. But I would like to avoid changing extension itself, if there would be any other method for achieving this.

EDIT: Another new thing. When TbMenu,dropup is set to true, menu is drawn incorrectly. The "arrow-corner" is still pointing up (like in menus opened down), while it should point down, toward parent menu object. And if such opened up menu has subitems, they are drawn in a complete mess -- background is somewhere else and many other drawing errors appears, making dropup option completely unusable (see attachment). Do you know if this is Chris' extension issue or whole Bootstrap works like this?

Attached File  TbMenu-dropUp-Drawing-Errors.png (10.82K)
Number of downloads: 26

Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#753 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 117
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 13 October 2012 - 11:25 AM

View PostTrejder, on 13 October 2012 - 07:53 AM, said:

Don Felipe, your a true help here! Thank you so much! :] Let me answer in points, because this is getting to long...

Works like a charm! Thank you and trully deserved +1! :]


Thats pretty pitty. I don't seems to be beliving that they have missed such obvious thing like submenus on mobile devices. Anyway, I posted a question on Google Groups Twitter Bootstrap forum and we'll see, if I get any reply there.

New thing. Is there any way I can force navbar to not make brand a clickable link? It is quite easy using pure Bootstrap, but I don't see any way to achieve it in Chris' extension. Even setting brandUrl to empty string or false doesn't stopped navbar from adding brand with link. Of course, I'm asking about any outter methods, like modyfing htmlOptions etc. Changing extension itself to don't add link and only display text, when brandUrl is empty or false, would took five mintues or so. But I would like to avoid changing extension itself, if there would be any other method for achieving this.

EDIT: Another new thing. When TbMenu,dropup is set to true, menu is drawn incorrectly. The "arrow-corner" is still pointing up (like in menus opened down), while it should point down, toward parent menu object. And if such opened up menu has subitems, they are drawn in a complete mess -- background is somewhere else and many other drawing errors appears, making dropup option completely unusable (see attachment). Do you know if this is Chris' extension issue or whole Bootstrap works like this?

Attachment TbMenu-dropUp-Drawing-Errors.png


Thanks for the +1.

You're absolutely right! There should be an option to define how to open submenus. It's not even rocket science but adding one more if condition and slightly changing the javascript function. Of course it has to happen on Twitter Bootstrap's side first. We'll see what your question may lead to.

First new thing:
That's another funny thing. Why isn't there any easy option to omit the link on the brand?
Try this workaround (should work):

'brandOptions'=>array('onclick'=>'return false;', 'style'=>'cursor:default;'),


Another new thing:
Nice find! Nice bug! I don't use dropups at all so I've never come across this so far.
I think this is worth another ticket and bug report.

In the meantime you can change this behavior in your local css. I don't have any time to do this for you right now, so you have to make it work on your side. Sorry!

.navbar .nav > li > .dropdown-menu:before {
  position: absolute;
  top: -7px;
  left: 9px;
  display: inline-block;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #ccc;
  border-left: 7px solid transparent;
  border-bottom-color: rgba(0, 0, 0, 0.2);
  content: '';
}


Now, you need to overwrite the border in :before, then add a similar class using :after and setting border-top accordingly. You should NOT overwrite the above, but add a new class for the .dropup instead, something like this:

.navbar .dropup > li > .dropdown-menu:before {} //or
.navbar .nav.dropup > li > .dropdown-menu:before {}

and

.navbar .dropup > li > .dropdown-menu:after {} //or
.navbar .nav.dropup > li > .dropdown-menu:after {}

If you have any problems, I will have a look at it tomorrow. Good luck!
0

#754 User is offline   yiistudent 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 15-November 10

Posted 13 October 2012 - 11:41 AM

How to use BootDatePicker?
0

#755 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,197
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 14 October 2012 - 05:11 PM

View Postyiistudent, on 13 October 2012 - 11:41 AM, said:

How to use BootDatePicker?

There is no such thing on demo page, which leads into conclusion, that it is not yet implemented.

Visit issues page (create a BitBucket account, if you don't have one) and rise a ticket to add it to newer version of YiiBootstrap.
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#756 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,197
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 14 October 2012 - 05:15 PM

Thanks for your detailed answer.

No, I'm not going to try to fix it myself. I'm doing a barebone app for myself, so I have comfort to wait, until Chris fixes that up. But it is good to know, that fixing these problems is quite easy, so thanks for sharing your ideas.

I found another thing today, so I finally decided to get a BitBucket account to raise some tickets as you suggested.
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#757 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 117
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 14 October 2012 - 09:54 PM

View PostTrejder, on 14 October 2012 - 05:11 PM, said:

There is no such thing on demo page, which leads into conclusion, that it is not yet implemented.


DatePicker, ColorPicker, and WYSIWYG editors neither are features of the original TB framework nor this yii extension.

chris83 has made it clear before he does not plan to implement any features that are not part of the original TB no matter how useful they might be. We'll have to wait until these features are part of the original first or implement them manually... not too complicated when it comes to DatePicker btw.
0

#758 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,197
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 16 October 2012 - 04:29 AM

Don Felipe,

Do you know, if Chris has time for active support of his extension right now?

He is replying for questions on Yii-Bootstrap user group, but there is nothing happening ot BitBucket issues handler and he hasn't visited Yii forum for nearly two months.

Cheers,
Trejder
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#759 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 117
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 16 October 2012 - 05:20 AM

View PostTrejder, on 16 October 2012 - 04:29 AM, said:

Don Felipe,

Do you know, if Chris has time for active support of his extension right now?

He is replying for questions on Yii-Bootstrap user group, but there is nothing happening ot BitBucket issues handler and he hasn't visited Yii forum for nearly two months.

Cheers,
Trejder



Hi Trejder,

just send him a private message and ask him directly though you may want to give Chris more than 24h to react on the new tickets you have just added yesterday. There's a lot of open tickets and it'll take a long time to fix them all. Well, the entire project has reached a certain size, Chris should consider sharing the work load of the project. Maybe I would... :)

Cheers,
Felipe
0

#760 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,197
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 17 October 2012 - 07:21 AM

Good idea,

I've sent him a private message here, nearly a month ago. But since he hasn't vistied the forum for nearly two months, he obviously wasn't able to read it.

I've just sent him PM on bitbucket.

Cheers,
Trejder
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

Share this topic:


  • (45 Pages)
  • +
  • « First
  • 36
  • 37
  • 38
  • 39
  • 40
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users