filename
stringlengths
20
188
language
stringclasses
3 values
AST-segments
stringlengths
0
204k
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
left: 0
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
width: $(origCell).outerWidth()
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
height: $(origCell).outerHeight() } ) .appendTo( 'body' ); this.dom.pointer = $('<div></div>') .addClass( 'DTCR_pointer' ) .css( { position: 'absolute'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
top: scrolling ? $('div.dataTables_scroll'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
this.s.dt.nTableWrapper).offset().top : $(this.s.dt.nTable).offset().top
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
height : scrolling ? $('div.dataTables_scroll'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
this.s.dt.nTableWrapper).height() : $(this.s.dt.nTable).height() } ) .appendTo( 'body' ); }
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
/** * Clean up ColReorder memory references and event handlers * @method _fnDestroy * @returns void * @private */ "_fnDestroy": function () { var i
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
iLen; for ( i=0
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
iLen=this.s.dt.aoDrawCallback.length ; i<iLen ; i++ ) { if ( this.s.dt.aoDrawCallback[i].sName === 'ColReorder_Pre' ) { this.s.dt.aoDrawCallback.splice( i
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
1 ); break; } } $(this.s.dt.nTHead).find( '*' ).off( '.ColReorder' ); $.each( this.s.dt.aoColumns
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
function (i
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
column) { $(column.nTh).removeAttr('data-column-index'); } ); this.s.dt._colReorder = null; this.s = null; }
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
/** * Add a data attribute to the column headers
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
so we know the index of * the row to be reordered. This allows fast detection of the index
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
and * for this plug-in to work with FixedHeader which clones the nodes. * @private */ "_fnSetColumnIndexes": function () { $.each( this.s.dt.aoColumns
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
function (i
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
column) { $(column.nTh).attr('data-column-index'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
i); } ); } }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Static parameters * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * ColReorder default settings for initialisation * @namespace * @static */ ColReorder.defaults = { /** * Predefined ordering for the columns that will be applied automatically * on initialisation. If not specified then the order that the columns are * found to be in the HTML is the order used. * @type array * @default null * @static * @example * // Using the `oColReorder` option in the DataTables options object * $('#example').dataTable( { * "sDom": 'Rlfrtip'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
* "oColReorder": { * "aiOrder": [ 4
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
3
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
2
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
1
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
0 ] * } * } ); * * @example * // Using `new` constructor * $('#example').dataTable() * * new $.fn.dataTable.ColReorder( '#example'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
{ * "aiOrder": [ 4
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
3
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
2
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
1
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
0 ] * } ); */ aiOrder: null
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
/** * Redraw the table's column ordering as the end user draws the column * (`true`) or wait until the mouse is released (`false` - default). Note * that this will perform a redraw on each reordering
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
which involves an * Ajax request each time if you are using server-side processing in * DataTables. * @type boolean * @default false * @static * @example * // Using the `oColReorder` option in the DataTables options object * $('#example').dataTable( { * "sDom": 'Rlfrtip'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
* "oColReorder": { * "bRealtime": true * } * } ); * * @example * // Using `new` constructor * $('#example').dataTable() * * new $.fn.dataTable.ColReorder( '#example'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
{ * "bRealtime": true * } ); */ bRealtime: false
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
/** * Indicate how many columns should be fixed in position (counting from the * left). This will typically be 1 if used
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
but can be as high as you like. * @type int * @default 0 * @static * @example * // Using the `oColReorder` option in the DataTables options object * $('#example').dataTable( { * "sDom": 'Rlfrtip'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
* "oColReorder": { * "iFixedColumns": 1 * } * } ); * * @example * // Using `new` constructor * $('#example').dataTable() * * new $.fn.dataTable.ColReorder( '#example'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
{ * "iFixedColumns": 1 * } ); */ iFixedColumns: 0
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
/** * As `iFixedColumnsRight` but counting from the right. * @type int * @default 0 * @static * @example * // Using the `oColReorder` option in the DataTables options object * $('#example').dataTable( { * "sDom": 'Rlfrtip'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
* "oColReorder": { * "iFixedColumnsRight": 1 * } * } ); * * @example * // Using `new` constructor * $('#example').dataTable() * * new $.fn.dataTable.ColReorder( '#example'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
{ * "iFixedColumnsRight": 1 * } ); */ iFixedColumnsRight: 0
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
/** * Callback function that is fired when columns are reordered * @type function():void * @default null * @static * @example * // Using the `oColReorder` option in the DataTables options object * $('#example').dataTable( { * "sDom": 'Rlfrtip'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
* "oColReorder": { * "fnReorderCallback": function () { * alert( 'Columns reordered' ); * } * } * } ); * * @example * // Using `new` constructor * $('#example').dataTable() * * new $.fn.dataTable.ColReorder( '#example'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
{ * "fnReorderCallback": function () { * alert( 'Columns reordered' ); * } * } ); */ fnReorderCallback: null }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Constants * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * ColReorder version * @constant version * @type String * @default As code */ ColReorder.version = "1.1.3"; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DataTables interfaces * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ // Expose $.fn.dataTable.ColReorder = ColReorder; $.fn.DataTable.ColReorder = ColReorder; // Register a new feature with DataTables if ( typeof $.fn.dataTable == "function" && typeof $.fn.dataTableExt.fnVersionCheck == "function" && $.fn.dataTableExt.fnVersionCheck('1.9.3') ) { $.fn.dataTableExt.aoFeatures.push( { "fnInit": function( settings ) { var table = settings.oInstance; if ( ! settings._colReorder ) { var dtInit = settings.oInit; var opts = dtInit.colReorder || dtInit.oColReorder || {}; new ColReorder( settings
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
opts ); } else { table.oApi._fnLog( settings
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
1
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
"ColReorder attempted to initialise twice. Ignoring second" ); } return null; /* No node for DataTables to insert */ }
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
"cFeature": "R"
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
"sFeature": "ColReorder" } ); } else { alert( "Warning: ColReorder requires DataTables 1.9.3 or greater - www.datatables.net/download"); } // API augmentation if ( $.fn.dataTable.Api ) { $.fn.dataTable.Api.register( 'colReorder.reset()'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
function () { return this.iterator( 'table'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
function ( ctx ) { ctx._colReorder.fnReset(); } ); } ); $.fn.dataTable.Api.register( 'colReorder.order()'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
function ( set ) { if ( set ) { return this.iterator( 'table'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
function ( ctx ) { ctx._colReorder.fnOrder( set ); } ); } return this.context.length ? this.context[0]._colReorder.fnOrder() : null; } ); } return ColReorder; }; // /factory // Define as an AMD module if possible if ( typeof define === 'function' && define.amd ) { define( ['jquery'
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
'datatables']
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
factory ); } else if ( typeof exports === 'object' ) { // Node/CommonJS factory( require('jquery')
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
require('datatables') ); } else if ( jQuery && !jQuery.fn.dataTable.ColReorder ) { // Otherwise simply initialise as normal
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
stopping multiple evaluation factory( jQuery
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
jQuery.fn.dataTable ); } })(window
miguelacosta84_NEAR-lista-de-precios_web_public_datatables_new_extensions_ColReorder_js_dataTables.colReorder.js
javascript
document);
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
import React
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
{ useState } from "react"; import { Modal
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
Button
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
Container
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
Row
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
Form } from "react-bootstrap"; const initialValues = { assetBid: "" };
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
function ModalBuy(props) { const [values
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
setValues] = useState(initialValues); // state for modals const [buyVisible
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
setBuyVisible] = useState(false); const buyClose = () => setBuyVisible(false); const buyShow = () => setBuyVisible(true); const handleInputChange = (e) => { const { name
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
value } = e.target; setValues({ ...values
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
[name]: value
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
}); }; // function to buy NFT const OfferPrice = async (token_id) => { await props.walletConnection.account().functionCall({ contractId: props.nearConfig.marketContractName
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
methodName: "offer"
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
args: { nft_contract_id: props.nearConfig.contractName
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
token_id
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
}
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
attachedDeposit: props.parseNearAmount(props.sale_conditions)
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
gas: props.nearConfig.GAS
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
}) } return ( <><Button variant="outline-primary" onClick={buyShow} >Buy</Button> <Modal show={buyVisible} size="lg" onHide={buyClose}> <Modal.Header closeButton>Buy this NFT</ Modal.Header> <Modal.Body> <Container> <Row> <form> <div className="form-in-wrapper"> <p>For {props.sale_conditions} NEAR or more</p> <div className="box-wrapper"> <div className="box-in-wrapper"> <div className="input-wrapper"> <input className="full-width" placeholder={props.sale_conditions} name="assetBid" type="text" value={values.assetBid} onChange={handleInputChange} /> </div> </div> </div> <div className="form-btn-wrapper"> <Button variant="outline-primary" onClick={(e) => { e.preventDefault(); OfferPrice(props.token_id); }} >Buy now</Button> </div> </div> </form> </Row> </Container> </Modal.Body> <Modal.Footer> <Button variant="outline-primary" onClick={buyClose}> Close </Button> </Modal.Footer> </Modal> </> ); }
intellichain555_Varda_nft_Staking_src_Modals_ModalBuy.js
javascript
export default ModalBuy;
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
const { parse } = require('handlebars')
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
let { Nomination
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
NominationQueue
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
User
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
NominationVote } = require('../models')
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
{ transaction } = require('objection')
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
{ filterer } = require('../lib/filters')
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
moment = require('moment')
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
module.exports = { async getNominations(query = {}
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
pageNumber = 0
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
perPage = 20) { query.filter = { ...(query.filter || {}) } query.filter.for_month = moment().clone().startOf('month').format('YYYY-MM-DD') return { ...await filterer(query
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
Nomination
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
{ pageNumber
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
perPage
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
related: query.related
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
orderBy: query.orderBy || 'id' })
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
page: pageNumber
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
per_page: perPage } }
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
async getNomination(id
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
query) { if (!id) { throw { message: 'ID Not Provided'
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
statusCode: 400 } } let theNomination = await Nomination.query().findById(id).eager(query.related) if (!theNomination) { throw { message: 'Nomination Not Found'
GoldenEagle1035_marketplace-api_NEAR_app_controllers_Nominations.js
javascript
statusCode: 404 } } return theNomination }