Jump to content

mstdmstd

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mstdmstd

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I got a hint and in the end of the resources/js/pages/ship.js I added line : window.shipsCRUD = shipsCRUD; It fixed my error, but now I got a console error : Uncaught TypeError: this.ShipsLoad is not a function Method ShipsLoad is defined in the same resources/js/pages/ship.js file: let frontend_home_url let this_id let this_csrf_token function shipsCRUD(page, paramsArray) { // constructor of backend Ship's editor - set all from referring page and from server frontend_home_url = paramsArray.frontend_home_url; this_dataTablesLengthMenuArray = paramsArray.dataTablesLengthMenuArray; this_csrf_token = paramsArray.csrf_token; if (page == "edit") { this_id = paramsArray.id; } if (page == "list") { this.ShipsLoad() // I CALL this.ShipsLoad $(".dataTables_filter").css("display", "none") $(".dataTables_info").css("display", "none") } } // function shipsCRUD(Params) { constructor of backend Ship's editor - set all from referring page and from server shipsCRUD.prototype.onCRUDPageInit = function (page) { // all vars/objects init initCRUD() } // shipsCRUD.prototype.onCRUDPageInit= function(page) { shipsCRUD.prototype.runSearch = function (oTable) { oTable.draw(); } shipsCRUD.prototype.ShipsLoad = function () { // ShipsLoad DEFINITION oTable = $('#get-ship-dt-listing-table').DataTable({ processing: true, ... }); // oTable = $('#get-ship-dt-listing-table').DataTable({ } Actually ship.js has several methods, which I call from blade tamplate or from the other methods of ship.js file. Which is correct way of ShipsLoad definition and calling ?
  2. Hello, In my laravel 6 app I use js files which I attach in in blade file resources/views/ship/index.blade.php like : @endsection @section('scripts') <link rel="stylesheet" href="{{ asset('/css/jquery.dataTables.min.css') }}" type="text/css"> <script src="{{ asset('js/jquery.dataTables.min.js') }}"></script> <script src="{{ asset('js/mustache.min.js') }}"></script> <script src="{{ asset('js/pages/ship.js') }}"></script> <script> /*<![CDATA[*/ var oTable jQuery(document).ready(function ($) { var shipsCRUD = shipsCRUD('list', // must be called before jQuery(document).ready(function ($) { <?php echo $appParamsForJSArray ?> ); shipsCRUD.onCRUDPageInit('list') }); /*]]>*/ </script> @endsection and that worked ok for me when I put js/pages/ship.js file under /public/ directory. Having in resources/js/pages/ship.js : let frontend_home_url let this_id let this_csrf_token function shipsCRUD(page, paramsArray) { // constructor of backend Ship's editor - set all from referring page and from server frontend_home_url = paramsArray.frontend_home_url; this_dataTablesLengthMenuArray = paramsArray.dataTablesLengthMenuArray; this_csrf_token = paramsArray.csrf_token; if (page == "edit") { this_id = paramsArray.id; } if (page == "list") { this.ShipsLoad() $(".dataTables_filter").css("display", "none") $(".dataTables_info").css("display", "none") } } // function shipsCRUD(Params) { constructor of backend Ship's editor - set all from referring page and from server shipsCRUD.prototype.onCRUDPageInit = function (page) { // all vars/objects init initCRUD() } // shipsCRUD.prototype.onCRUDPageInit= function(page) { But I have got a hint that it is a wrong way to have editable file under /public/ and I put file ship.js as resources/js/pages/ship.js and I added 1 line in webpack.mix.js : mix.js('resources/js/app.js', 'public/js') .sass('resources/sass/app.scss', 'public/css') ... .js('resources/js/pages/trip-details.js', 'public/js/pages') .js('resources/js/pages/ship.js', 'public/js/pages') and running command : npm run watch-poll I have a file moved at /public/js/pages/ship.js with content : /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/"; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 4); /******/ }) /************************************************************************/ /******/ ({ /***/ "./resources/js/pages/ship.js": /*!************************************!*\ !*** ./resources/js/pages/ship.js ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports) { var frontend_home_url; var this_id; var this_csrf_token; function shipsCRUD(page, paramsArray) { // constructor of backend Ship's editor - set all from referring page and from server // console.log('paramsArray::') // console.log(paramsArray) frontend_home_url = paramsArray.frontend_home_url; this_dataTablesLengthMenuArray = paramsArray.dataTablesLengthMenuArray; this_csrf_token = paramsArray.csrf_token; if (page == "edit") { this_id = paramsArray.id; } if (page == "list") { this.ShipsLoad(); $(".dataTables_filter").css("display", "none"); $(".dataTables_info").css("display", "none"); } } // function shipsCRUD(Params) { constructor of backend Ship's editor - set all from referring page and from server shipsCRUD.prototype.onCRUDPageInit = function (page) { // all vars/objects init initCRUD(); }; // shipsCRUD.prototype.onCRUDPageInit= function(page) { ... But in in console I got error : app.js:73188 Uncaught TypeError: shipsCRUD is not a function at HTMLDocument.<anonymous> (ships:429) at mightThrow (app.js:72895) at process (app.js:72963) 1) Why I got error in this way and how to fix it ? 2) Also could you please advice a proper way to publish jquery.dataTables.min.css/js files? If I want to avoid putting them under /public/, which is valid way? Thanks!
  3. Thanks for your hint ! I got a ref to v-money from v-money github page and made this http://jsfiddle.net/oxqv7bwt/1/ fiddle. But validating data I always see success validation, event with negative default value : I added console in positive_price rule definition, but I do not see this output... Please, take a look why positive_price is not triggered. The sense of this fiddle is just to run positive_price custom rule.
  4. Could, you please give a link to this docs?
  5. Hello, I need to make jsfiddle with vuejs, vee-validate and v-money libs, and when I need to add some js lib to jsfiddle I open https://cdnjs.com/ and search lirary I need and found lib I attach in jsfiddle. But on https://cdnjs.com/ entering “v-money” it did not show any results. If there is a way to create a jsfiddle(or maybe some other similar service) with v-money lib? Thanks!
  6. Hello, On registration on one of sites I got a question for confirmation : Can you explain who/what is the answer? Thanks!
  7. I tried today and again have same errors. Is it problem with my provider ? Today week end and they do notwork. Can you open my site ? could you please provide a printscreen of what you see at https://www.whatsmydns.net/#CNAME/votes.my-demo-apps.tk ?
  8. Hello, I encountered that my several aplications (installed on ubuntu 16 on digital Ocean and domains are created in freenom.com) are unavailable and returns DNS_PROBE_FINISHED_NXDOMAIN error like running https://www.votes.my-demo-apps.tk/ I got : This site can’t be reached www.votes.my-demo-apps.tk’s server IP address could not be found. DNS_PROBE_FINISHED_NXDOMAIN I see line inhttps://my.freenom.com/ when I created dns domsain with subdomain : https://prnt.sc/qdyp5l Running whatsmydns service https://www.whatsmydns.net/#CNAME/votes.my-demo-apps.tk I see that my subdomain is available in maybe half of centers, but not all. Could you please to chacke it from your side ? I am located in Ukraine. Which steps have I to take to check reason of error ? Thanks!
  9. Yes, you are right : sizes are different. I fixed the issue. Could you, please, take a look at legend layout at page http://vtasks.my-demo-apps.tk/public_profile/3 I aded borders for fieldset, but with border legend text is striked out : https://prnt.sc/qat40d and I did not find how to fix it...
  10. I suppose from Bootstrap 4. Are they different? Actually I used browsers default devices for testing? Do you mean that for Bootstrap 3 and Bootstrap 4 sizes are different ?
  11. 2) I suppose : small grid (≥ 768px) = .col-sm-*, medium grid (≥ 992px) = .col-md-*, large grid (≥ 1200px) = .col-lg-*. and is it related with problem I have ?
  12. I provided a printscreen with device selected at top : ipad : 768*1024. Did you see it ? I expected content be in 1 column. Why in 2 columns ?
  13. Hello, Could you please look at design of http://vtasks.my-demo-apps.tk/ site In my vue/cli 4 / Bootstrap 4.3 app I make listing of tasks in 1 column on small devices(ipad-s) and 2 columns on big devices, like : <div class="row " v-show="tasks.length && is_page_loaded"> <div v-for="(nextActiveTask, index) in tasks" :key="nextActiveTask.id" class="col-sm-12 col-md-6 p-2 m-0"> <task-list-item :currentLoggedUser="currentLoggedUser" :nextActiveTask="nextActiveTask" :index="index" :is_show_location="true" ></task-list-item> </div> </div> But testing different devices with Chrome, Chromium I see 2 colums on ipad: https://imgur.com/a/QEfcHdi and I do not see why. Is it error in my design? Problems with browsers ? Thanks!
  14. Thanks! Also In my projects I use blade,vue, javascript . 1) Do they have PSR2 format utility or maybe something similar it? 2) Are there some tools not refomat code, but show me errors not inside PSR2 ?
  15. Hello, I have PhpStorm 2019.2.3 and wonder if it some plugin/tools to keep my php/html/vue/js code within PSR-2 rules ? Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.