This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root = ". | |
| rootpath => C:/...root_path... | |
| apppath => C:/...root_path.../vendor/bolt/bolt/app | |
| extensionsconfig => C:/...root_path.../src/Site/Resources/config/extensions | |
| extensionsconfigpath => C:/...root_path.../src/Site/Resources/config/extensions | |
| extensionspath => C:/...root_path.../app/extensions | |
| filespath => C:/...root_path.../web/files | |
| web => C:/...root_path.../web | |
| webpath => C:/...root_path.../web | |
| cache => C:/...root_path.../app/vars/cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body, #navpage-content { | |
| background-color: #f9f9f7; | |
| } | |
| .navbar-bolt { | |
| background-color: #f9b304; | |
| box-shadow: none !important; | |
| background-image: none !important; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| /** | |
| * ### convert_select | |
| * Sometimes you set values as ['foo', 'bar'] and bolt stores them as strings in db. | |
| * It works ok, if you set values as ['':'', 0: 'foo', 1: bar] in contenttypes.yml. | |
| * I wanted to update my old values, so i created a util function. Here it is, use however you want. | |
| * | |
| * @param Application $app | |
| * @param string $contenttype_slug | |
| * @param array $allowed_fields - select fields that should be processed (for ex. ['vendors', 'models']).<br> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function get_avatar_from_service(service, userid, size) { | |
| // this return the url that redirects to the according user image/avatar/profile picture | |
| // implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback | |
| // for google use get_avatar_from_service('google', profile-name or user-id , size-in-px ) | |
| // for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word ) | |
| // for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px ) | |
| // for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word ) | |
| // for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px ) | |
| // everything else will go to the fallback | |
| // google and gravatar scale the avatar to any site, others will guided to the next best version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add to toolbar here : http://mrcoles.com/bookmarklet/ | |
| // Version 1 (older) | |
| // non-transparent lists | |
| setTimeout(function () { | |
| $(function () { | |
| var $style = $('#klaus-style'); | |
| $('#header').off('dblclick.klaus').on('dblclick.klaus', function () { | |
| console.log('switching mode'); | |
| $('html').toggleClass('_compact'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pattern = /(\s+)([живобаксуяАВИКОСУЯ0-9])(\s)+([а-яА-Я0-9])/g | |
| // to $1$2 $4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pattern = /([а-яА-Яa-zA-Z,])([ \t]+)([-|—])([ \t]+)([а-яА-Яa-zA-Z])/ | |
| // to $1 —$4$5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Markdown Editor</title> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //requires _.throttle and jquery, but dependency could be removed | |
| (function() { | |
| var AutoGrowTextArea; | |
| AutoGrowTextArea = function(e) { | |
| var textField; | |
| textField = e.target; | |
| if (textField.clientHeight < textField.scrollHeight) { | |
| textField.style.height = textField.scrollHeight + 'px'; | |
| if (textField.clientHeight < textField.scrollHeight) { | |
| textField.style.height = textField.scrollHeight * 2 - textField.clientHeight + 'px'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function makePayment(loanId, amount, paymentMethodId) { | |
| return dispatch => { | |
| dispatch(makePaymentSent()) | |
| fetch(`/api/loans/${loanId}/payments`, { | |
| headers: new Headers({ | |
| 'Content-Type': 'application/json', | |
| }), | |
| credentials: 'same-origin', | |
| method: 'POST', | |
| body: JSON.stringify({ |