CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Google Summer of Code »
  • Bootstrap for CiviCRM UI
Pages: 1 ... 3 4 [5]

Author Topic: Bootstrap for CiviCRM UI  (Read 10621 times)

ninabyte

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Bootstrap for CiviCRM UI
July 28, 2014, 03:49:27 pm
Quote from: Donald Lobo on July 28, 2014, 03:33:19 pm

Has anyone checked and see how these changes affect the other two CMS'es - Joomla and WP.

and what needs to be done for it to co-exist with those two also

lobo


Teja started building on WordPress, but his focus over the past couple of weeks has been on Drupal. I don't believe we've tried this on Joomla yet.

teja-amil

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Joomla! 3.2
  • MySQL version: 4
  • PHP version: 5
Re: Bootstrap for CiviCRM UI
July 31, 2014, 09:41:40 pm
Hi

Regarding addition of use bootstrap css option in back end go, after addition all the code the enable bootstrap was not working but it was also found that disable civicrm css was also broken. so for that I removed a line of code that was added previously.
In CRM/Form/Admin/Settiing/Url.php this code was added.
Code: [Select]
protected $_settings = array(
    'cvv_backoffice_required' => CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME,
    'disable_core_css' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
   'enable_bootstrap_css' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
  );

Removing
Code: [Select]
'enable_bootstrap_css' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, line of code makes the disable function working.

I am not understanding what's the logic  behind this, as enable_bootstrap_css has no relation with disable_core_css(created enable function viewing disable function) and adding enable_bootstrap_css function is braking disable_core_css.

Any suggestions?

teja-amil

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Joomla! 3.2
  • MySQL version: 4
  • PHP version: 5
Re: Bootstrap for CiviCRM UI
August 04, 2014, 06:15:34 am
Hi

Update regarding addition of option to enable Bootstrap CSS in back end.

I made a small error previously, and I found it out.

In CRM/Core/Resources.php
Code: [Select]
if(CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,'enable_bootstrap_css'))
     
      {
         $this->addstyleFile('bootstrap', 'css/bootstrap.css', -99, $region);
      }

There was no component named Bootstrap, So I changed it to civicrm.
Code: [Select]
if(CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,'enable_bootstrap_css'))
     
      {
         $this->addstyleFile('civicrm', 'css/bootstrap.css', -99, $region);
      }

With this, the variable value is stored in database and the option change is reflected but Bootstrap CSS is not yet loading. Will recheck other files too.

One more Hint:

As Emily has suggested to try it with else condition, I made changes to the Resources.php, but still the problem exists.
Code: [Select]
   else{
       
        if(CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,'enable_bootstrap_css'))
     
      {
         $this->addstyleFile('civicrm', 'css/bootstrap.css', -99, $region);
      }
    }
  }

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Bootstrap for CiviCRM UI
August 04, 2014, 07:26:25 am
Hi Teja,

It is very important to carefully review your code, I cannot stress this enough. The first thing that I notice is you are not calling the right function. You are calling

Code: [Select]
$this->addstyleFile('civicrm', 'css/bootstrap.css', -99, $region);

but the function is actually:
Code: [Select]
public function addStyleFile
Try with the correct syntax and then attempt additional debugging techniques if it is still not working - since you know that the addStyleFile for civicrm.css is working, use that as your example to guide you.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Bootstrap for CiviCRM UI
August 04, 2014, 06:04:08 pm
download phpstorm - a mistake like that will jump off the page at you if you are using an IDE - phpstorm is not free except it kinda is. There is an EAP programme which gives you a free license & then you have to download the next version 30 days later. I guess this kind of means you are getting it free in exchange for being a BETA tester.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

teja-amil

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Joomla! 3.2
  • MySQL version: 4
  • PHP version: 5
Re: Bootstrap for CiviCRM UI
August 05, 2014, 10:10:43 am
Hi,

Update:

1. The issue I was facing for the last one week has be solved. Option of using Bootstrap CSS is now working. Which mean Bootstrap CSS is loading when the option in back end is changed to yes and vice-versa. The git hub fork for my project is :  https://github.com/amilineni/civicrm-core .
 I made all the commits regarding the project.

Upcoming Goals:

1. Few scaling issues exist in Contribution Page, which will be done in next 24 hrs.
2. Documentation for this project will be written in couple of days.

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Bootstrap for CiviCRM UI
August 08, 2014, 03:01:08 pm
Sorry if this question has been answered already - the option to use or not use Bootstrap, I'm wondering how this works with a CMS theme that already uses Bootstrap. I see that enabling Bootstrap turns on the CSS, are you expecting that if a theme already includes the Bootstrap framework then they will disable Bootstrap in the CiviCRM admin interface? Or will they need to include both the CMS theme and CiviCRM module versions of Bootstrap?
@xurizaemon ● www.fuzion.co.nz

teja-amil

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Joomla! 3.2
  • MySQL version: 4
  • PHP version: 5
Re: Bootstrap for CiviCRM UI
August 17, 2014, 12:20:44 am
Hi,

Update:

As GSOC14 has reached its final stage, here is a brief update of all the things I have been doing -

Documentation for this project is as follows : http://wiki.civicrm.org/confluence/display/CRMDOC/Bootstrap+UI+for+CiviCRM

Blog Post for this project : https://civicrm.org/blogs/teja/bootstrap-ui-one-small-step-civicrm

Git Hub link :https://github.com/amilineni/civicrm-core

Pages: 1 ... 3 4 [5]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Google Summer of Code »
  • Bootstrap for CiviCRM UI

This forum was archived on 2017-11-26.