Skip to content

Instantly share code, notes, and snippets.

View cAstraea's full-sized avatar

cAstraea

View GitHub Profile
.ui-autocomplete {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
_width: 160px;
padding: 4px 0;
@cAstraea
cAstraea / record.js
Created April 19, 2016 11:27
muli select deps sugarcrm
({ extendsFrom: 'RecordView',
initialize: function(options) {
this._super('initialize', [options]);
this.on("render", this.displayFunction, this);//launch it whenever your page is rendered
this.model.on("change:objectifs_c",this.displayFunction, this);//display changes when the multi select changes for visite objectifs
this.model.on("change:phonobjectif_c",this.displayFunction, this);
this.model.on("change:actioncoobjectif_c",this.displayFunction, this);
},
@cAstraea
cAstraea / record.js
Created April 22, 2016 10:45
Updates field in Account module from module B. [ Module Accounts <-> Module B in a 1-n relationship ]
({ extendsFrom: 'RecordView', // extendsFrom: 'CreateView',
initialize: function(options) {
this._super('initialize', [options]);
this.model.on('sync', this.UpdateDateVisite, this);
},
UpdateDateVisite : function() {
Feature: Login
In order to gain access to the skoazell interface
As a web user
I need to login
@javascript
Scenario: Loggin in with correct username and password
Given I am on "/"
When I fill in "form-_username" with "admin@gmail.com"
When I fill in "form-_password" with "123"
@cAstraea
cAstraea / dxgrid.js
Created June 10, 2016 11:06
adding button after export button of dxgrid
onContentReady: function() {
var $addButton = $('#add');
console.log(SearchFiltersSKZ);
if(! $addButton.length ) //
{
$( '<div id="add" aria-label="edit-button-addrow" role="button" onclick="void(0)" tabindex="0" title="Add a row" class="dx-edit-button dx-datagrid-addrow-button dx-widget dx-button-has-icon dx-button dx-button-normal"><div class="dx-button-content"><i class="dx-icon dx-icon-edit-button-addrow"></i></div></div>' ).insertAfter('.dx-datagrid-export-button');
$("#{{ target }}").dxSelectBox({
items: itemsArrayforSelectBox,
onValueChanged: function (e) {
swal({
title: "Are you sure?",
text: "Deleting !",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, change it!",
@cAstraea
cAstraea / dx.web.frca.js
Last active October 28, 2016 07:44
devexpress french dxgrid translation
/*!
* DevExtreme Web
* Version: 16.1.4
* Build date: Jun 22, 2016
*
* Copyright (c) 2012 - 2016 Developer Express Inc. ALL RIGHTS RESERVED
* EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml
*/
(function(root, factory) {
var production = process.env.NODE_ENV === 'production';
var path = require('path');
var webpack = require('webpack');
var UnminifiedWebpackPlugin = require('unminified-webpack-plugin');
module.exports = {
entry: {
product: './web/js/productApp.js'
},
output: {
@cAstraea
cAstraea / testing
Created October 5, 2016 17:28
ES6 class
class Monster {
constructor({name}) {
this.health = 100;
this.name = name;
}
}
class Snake extends Monster {
constructor(options) {
super(options);
@cAstraea
cAstraea / tanks.js
Created January 31, 2017 10:36
javascript solution, Finds the minimum number of moves required to rearrange the tanks so that each row and each column contains a single tank, and one such shortest sequence of moves
process.stdin.resume();
process.stdin.setEncoding('ascii');
let input_stdin = '';
let input_stdin_array = '';
let input_currentline = 0;
process.stdin.on('data', (data) => {
input_stdin += data;